diff options
author | 2001-05-16 12:48:31 +0000 | |
---|---|---|
committer | 2001-05-16 12:48:31 +0000 | |
commit | d424e204e60bfd7ffd01a57d3983f326a20fef28 (patch) | |
tree | 49e17bdb4138ce9da9ed97cdb6b57b088efe1497 /sys/netinet6/ip6_output.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/netinet6/ip6_output.c')
-rw-r--r-- | sys/netinet6/ip6_output.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index 901dddb226d..7fa15e90167 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_output.c,v 1.32 2001/04/14 00:30:59 angelos Exp $ */ +/* $OpenBSD: ip6_output.c,v 1.33 2001/05/16 12:53:36 ho Exp $ */ /* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */ /* @@ -1775,8 +1775,6 @@ ip6_setmoptions(optname, im6op, m) im6o = (struct ip6_moptions *) malloc(sizeof(*im6o), M_IPMOPTS, M_WAITOK); - if (im6o == NULL) - return(ENOBUFS); *im6op = im6o; im6o->im6o_multicast_ifp = NULL; im6o->im6o_multicast_hlim = ip6_defmcasthlim; @@ -1940,10 +1938,7 @@ ip6_setmoptions(optname, im6op, m) * address list for the given interface. */ imm = malloc(sizeof(*imm), M_IPMADDR, M_WAITOK); - if (imm == NULL) { - error = ENOBUFS; - break; - } + if ((imm->i6mm_maddr = in6_addmulti(&mreq->ipv6mr_multiaddr, ifp, &error)) == NULL) { free(imm, M_IPMADDR); |