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/netinet6 | |
parent | 87f10021e726a2d2d79e079d9fe15180e3023b3e (diff) |
No need to check M_WAIT/M_WAITOK malloc return values. (art@ ok)
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/in6.c | 4 | ||||
-rw-r--r-- | sys/netinet6/ip6_output.c | 9 |
2 files changed, 3 insertions, 10 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index dc69615df10..86f324d2150 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6.c,v 1.26 2001/02/16 15:58:50 itojun Exp $ */ +/* $OpenBSD: in6.c,v 1.27 2001/05/16 12:53:36 ho Exp $ */ /* $KAME: in6.c,v 1.176 2001/02/16 12:49:45 itojun Exp $ */ /* @@ -429,8 +429,6 @@ in6_control(so, cmd, data, ifp, p) if (ia == NULL) { ia = (struct in6_ifaddr *) malloc(sizeof(*ia), M_IFADDR, M_WAITOK); - if (ia == NULL) - return (ENOBUFS); bzero((caddr_t)ia, sizeof(*ia)); /* Initialize the address and masks */ ia->ia_ifa.ifa_addr = (struct sockaddr *)&ia->ia_addr; 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); |