diff options
author | 2001-05-16 12:48:31 +0000 | |
---|---|---|
committer | 2001-05-16 12:48:31 +0000 | |
commit | d424e204e60bfd7ffd01a57d3983f326a20fef28 (patch) | |
tree | 49e17bdb4138ce9da9ed97cdb6b57b088efe1497 /sys/netccitt/pk_usrreq.c | |
parent | document SMALL_KERNEL. (diff) | |
download | wireguard-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/netccitt/pk_usrreq.c')
-rw-r--r-- | sys/netccitt/pk_usrreq.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/netccitt/pk_usrreq.c b/sys/netccitt/pk_usrreq.c index 8fa4c9b476c..24e1e334a74 100644 --- a/sys/netccitt/pk_usrreq.c +++ b/sys/netccitt/pk_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pk_usrreq.c,v 1.2 1996/03/04 07:36:47 niklas Exp $ */ +/* $OpenBSD: pk_usrreq.c,v 1.3 2001/05/16 12:53:35 ho Exp $ */ /* $NetBSD: pk_usrreq.c,v 1.10 1996/02/13 22:05:43 christos Exp $ */ /* @@ -360,8 +360,6 @@ pk_control(so, cmd, data, ifp) if (ifa == (struct ifaddr *) 0) { MALLOC(ia, struct x25_ifaddr *, sizeof(*ia), M_IFADDR, M_WAITOK); - if (ia == 0) - return (ENOBUFS); bzero((caddr_t) ia, sizeof(*ia)); TAILQ_INSERT_TAIL(&ifp->if_addrlist, &ia->ia_ifa, ifa_list); @@ -570,7 +568,7 @@ pk_send(m, v) if (m->m_pkthdr.len > 32) error = EMSGSIZE; M_PREPEND(m, PKHEADERLN, M_WAITOK); - if (m == 0 || error) + if (error) goto bad; *(mtod(m, octet *)) = 0; xp = mtod(m, struct x25_packet *); |