summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2015-05-13 10:42:48 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2015-05-13 10:42:48 +0000
commit752beb6c0c0e7329a60fd312719cd7a410162aa1 (patch)
tree1f811530e56b8d078e3a88c20203c6b15af4da30 /sys/netinet6
parent889970baeca780212c1953e389cafda53b2d471e (diff)
test mbuf pointers against NULL not 0
ok krw@ miod@
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/ip6_output.c10
-rw-r--r--sys/netinet6/udp6_output.c4
2 files changed, 7 insertions, 7 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index 3b8ec6a1269..a9a4258a714 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_output.c,v 1.170 2015/04/17 11:04:02 mikeb Exp $ */
+/* $OpenBSD: ip6_output.c,v 1.171 2015/05/13 10:42:47 jsg Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
@@ -1056,7 +1056,7 @@ ip6_insert_jumboopt(struct ip6_exthdrs *exthdrs, u_int32_t plen)
*/
if (exthdrs->ip6e_hbh == 0) {
MGET(mopt, M_DONTWAIT, MT_DATA);
- if (mopt == 0)
+ if (mopt == NULL)
return (ENOBUFS);
mopt->m_len = JUMBOOPTLEN;
optbuf = mtod(mopt, u_int8_t *);
@@ -1165,7 +1165,7 @@ ip6_insertfraghdr(struct mbuf *m0, struct mbuf *m, int hlen,
struct mbuf *mfrg;
MGET(mfrg, M_DONTWAIT, MT_DATA);
- if (mfrg == 0)
+ if (mfrg == NULL)
return (ENOBUFS);
mfrg->m_len = sizeof(struct ip6_frag);
*frghdrp = mtod(mfrg, struct ip6_frag *);
@@ -1602,7 +1602,7 @@ do { \
#ifndef IPSEC
error = EINVAL;
#else
- if (m == 0 || m->m_len != sizeof(int)) {
+ if (m == NULL || m->m_len != sizeof(int)) {
error = EINVAL;
break;
}
@@ -3106,7 +3106,7 @@ ip6_splithdr(struct mbuf *m, struct ip6_exthdrs *exthdrs)
ip6 = mtod(m, struct ip6_hdr *);
if (m->m_len > sizeof(*ip6)) {
MGETHDR(mh, M_DONTWAIT, MT_HEADER);
- if (mh == 0) {
+ if (mh == NULL) {
m_freem(m);
return ENOBUFS;
}
diff --git a/sys/netinet6/udp6_output.c b/sys/netinet6/udp6_output.c
index 686c0391625..874d3088f1b 100644
--- a/sys/netinet6/udp6_output.c
+++ b/sys/netinet6/udp6_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp6_output.c,v 1.33 2014/12/05 15:50:04 mpi Exp $ */
+/* $OpenBSD: udp6_output.c,v 1.34 2015/05/13 10:42:47 jsg Exp $ */
/* $KAME: udp6_output.c,v 1.21 2001/02/07 11:51:54 itojun Exp $ */
/*
@@ -182,7 +182,7 @@ udp6_output(struct inpcb *in6p, struct mbuf *m, struct mbuf *addr6,
* for UDP and IP6 headers.
*/
M_PREPEND(m, hlen + sizeof(struct udphdr), M_DONTWAIT);
- if (m == 0) {
+ if (m == NULL) {
error = ENOBUFS;
goto releaseopt;
}