diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2001-05-16 12:54:35 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2001-05-16 12:54:35 +0000 |
commit | 60de2c41ea2b387be2e4b7b9b565329dd0a61c36 (patch) | |
tree | 8652597c096bbc850f6862988cd18624122c0051 /sys/net/bpf.c | |
parent | 87f10021e726a2d2d79e079d9fe15180e3023b3e (diff) |
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.c | 11 |
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); |