summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_ipip.c
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2015-05-13 10:42:46 +0000
committerjsg <jsg@openbsd.org>2015-05-13 10:42:46 +0000
commit64a3f76c072dd81169df444ff036aa23170dc855 (patch)
treedb48aba5bb3c00b3a39e7e31fd32bbec39bd06f6 /sys/netinet/ip_ipip.c
parentGet rid of the last "#if NTRUNK" by overwriting trunk ports' output (diff)
downloadwireguard-openbsd-64a3f76c072dd81169df444ff036aa23170dc855.tar.xz
wireguard-openbsd-64a3f76c072dd81169df444ff036aa23170dc855.zip
test mbuf pointers against NULL not 0
ok krw@ miod@
Diffstat (limited to 'sys/netinet/ip_ipip.c')
-rw-r--r--sys/netinet/ip_ipip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ip_ipip.c b/sys/netinet/ip_ipip.c
index 7f104257f66..77756748da2 100644
--- a/sys/netinet/ip_ipip.c
+++ b/sys/netinet/ip_ipip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipip.c,v 1.58 2015/04/14 14:20:01 mikeb Exp $ */
+/* $OpenBSD: ip_ipip.c,v 1.59 2015/05/13 10:42:46 jsg Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -418,7 +418,7 @@ ipip_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int dummy,
}
M_PREPEND(m, sizeof(struct ip), M_DONTWAIT);
- if (m == 0) {
+ if (m == NULL) {
DPRINTF(("ipip_output(): M_PREPEND failed\n"));
ipipstat.ipips_hdrops++;
*mp = NULL;
@@ -514,7 +514,7 @@ ipip_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int dummy,
}
M_PREPEND(m, sizeof(struct ip6_hdr), M_DONTWAIT);
- if (m == 0) {
+ if (m == NULL) {
DPRINTF(("ipip_output(): M_PREPEND failed\n"));
ipipstat.ipips_hdrops++;
*mp = NULL;