summaryrefslogtreecommitdiffstats
path: root/sys/net/bpf.c
diff options
context:
space:
mode:
authorho <ho@openbsd.org>2001-05-16 12:48:31 +0000
committerho <ho@openbsd.org>2001-05-16 12:48:31 +0000
commitd424e204e60bfd7ffd01a57d3983f326a20fef28 (patch)
tree49e17bdb4138ce9da9ed97cdb6b57b088efe1497 /sys/net/bpf.c
parentdocument SMALL_KERNEL. (diff)
downloadwireguard-openbsd-d424e204e60bfd7ffd01a57d3983f326a20fef28.tar.xz
wireguard-openbsd-d424e204e60bfd7ffd01a57d3983f326a20fef28.zip
No need to check M_WAIT/M_WAITOK malloc return values. (art@ ok)
Diffstat (limited to 'sys/net/bpf.c')
-rw-r--r--sys/net/bpf.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index 5837e9618ef..f215c49dd60 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.c,v 1.25 2001/04/04 02:39:17 jason Exp $ */
+/* $OpenBSD: bpf.c,v 1.26 2001/05/16 12:53:34 ho Exp $ */
/* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */
/*
@@ -169,8 +169,6 @@ bpf_movein(uio, linktype, mp, sockp)
return (EIO);
MGETHDR(m, M_WAIT, MT_DATA);
- if (m == 0)
- return (ENOBUFS);
m->m_pkthdr.rcvif = 0;
m->m_pkthdr.len = len - hlen;
@@ -1145,14 +1143,7 @@ bpf_allocbufs(d)
register struct bpf_d *d;
{
d->bd_fbuf = (caddr_t)malloc(d->bd_bufsize, M_DEVBUF, M_WAITOK);
- if (d->bd_fbuf == 0)
- return (ENOBUFS);
-
d->bd_sbuf = (caddr_t)malloc(d->bd_bufsize, M_DEVBUF, M_WAITOK);
- if (d->bd_sbuf == 0) {
- free(d->bd_fbuf, M_DEVBUF);
- return (ENOBUFS);
- }
d->bd_slen = 0;
d->bd_hlen = 0;
return (0);