diff options
author | 2001-05-16 12:48:31 +0000 | |
---|---|---|
committer | 2001-05-16 12:48:31 +0000 | |
commit | d424e204e60bfd7ffd01a57d3983f326a20fef28 (patch) | |
tree | 49e17bdb4138ce9da9ed97cdb6b57b088efe1497 /sys/net/rtsock.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/net/rtsock.c')
-rw-r--r-- | sys/net/rtsock.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 84cf734dd49..81901fb7c92 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtsock.c,v 1.13 2001/01/19 06:37:37 itojun Exp $ */ +/* $OpenBSD: rtsock.c,v 1.14 2001/05/16 12:53:34 ho Exp $ */ /* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */ /* @@ -120,9 +120,8 @@ route_usrreq(so, req, m, nam, control) if (req == PRU_ATTACH) { MALLOC(rp, struct rawcb *, sizeof(*rp), M_PCB, M_WAITOK); - if ((so->so_pcb = rp) != NULL) - bzero(so->so_pcb, sizeof(*rp)); - + so->so_pcb = rp; + bzero(so->so_pcb, sizeof(*rp)); } if (req == PRU_DETACH && rp) { int af = rp->rcb_proto.sp_protocol; |