-/* $OpenBSD: if_bm.c,v 1.31 2015/02/09 03:09:57 dlg Exp $ */
+/* $OpenBSD: if_bm.c,v 1.32 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: if_bm.c,v 1.1 1999/01/01 01:27:52 tsubai Exp $ */
/*-
return;
IFQ_DEQUEUE(&ifp->if_snd, m);
- if (m == 0)
+ if (m == NULL)
break;
#if NBPFILTER > 0
/*
int len;
MGETHDR(m, M_DONTWAIT, MT_DATA);
- if (m == 0)
+ if (m == NULL)
return (0);
m->m_pkthdr.len = totlen;
len = MHLEN;
while (totlen > 0) {
if (top) {
MGET(m, M_DONTWAIT, MT_DATA);
- if (m == 0) {
+ if (m == NULL) {
m_freem(top);
return (0);
}
-/* $OpenBSD: if_de.c,v 1.27 2015/02/01 15:27:11 miod Exp $ */
+/* $OpenBSD: if_de.c,v 1.28 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: if_de.c,v 1.27 1997/04/19 15:02:29 ragge Exp $ */
/*
return;
for (nxmit = ds->ds_nxmit; nxmit < NXMT; nxmit++) {
IF_DEQUEUE(&ds->ds_if.if_snd, m);
- if (m == 0)
+ if (m == NULL)
break;
rp = &ds->ds_xrent[ds->ds_xfree];
if (rp->r_flags & XFLG_OWN)
-/* $OpenBSD: if_qe.c,v 1.31 2015/04/07 14:02:51 mpi Exp $ */
+/* $OpenBSD: if_qe.c,v 1.32 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: if_qe.c,v 1.51 2002/06/08 12:28:37 ragge Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
}
idx = sc->sc_nexttx;
IFQ_POLL(&ifp->if_snd, m);
- if (m == 0)
+ if (m == NULL)
goto out;
/*
* Count number of mbufs in chain.
-/* $OpenBSD: sgec.c,v 1.27 2015/05/02 14:33:19 jsg Exp $ */
+/* $OpenBSD: sgec.c,v 1.28 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: sgec.c,v 1.5 2000/06/04 02:14:14 matt Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
}
idx = sc->sc_nexttx;
IF_DEQUEUE(&sc->sc_if.if_snd, m);
- if (m == 0)
+ if (m == NULL)
goto out;
/*
* Count number of mbufs in chain.
-/* $OpenBSD: am7990.c,v 1.50 2015/05/01 14:56:18 mpi Exp $ */
+/* $OpenBSD: am7990.c,v 1.51 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: am7990.c,v 1.74 2012/02/02 19:43:02 tls Exp $ */
/*-
}
IFQ_DEQUEUE(&ifp->if_snd, m);
- if (m == 0)
+ if (m == NULL)
break;
#if NBPFILTER > 0
-/* $OpenBSD: am79900.c,v 1.4 2015/05/01 14:56:18 mpi Exp $ */
+/* $OpenBSD: am79900.c,v 1.5 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: am79900.c,v 1.23 2012/02/02 19:43:02 tls Exp $ */
/*-
}
IFQ_DEQUEUE(&ifp->if_snd, m);
- if (m == 0)
+ if (m == NULL)
break;
#if NBPFILTER > 0
-/* $OpenBSD: dp8390.c,v 1.51 2015/04/30 20:55:23 mpi Exp $ */
+/* $OpenBSD: dp8390.c,v 1.52 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: dp8390.c,v 1.13 1998/07/05 06:49:11 jonathan Exp $ */
/*
return;
}
IFQ_DEQUEUE(&ifp->if_snd, m0);
- if (m0 == 0)
+ if (m0 == NULL)
return;
/* We need to use m->m_pkthdr.len, so require the header */
-/* $OpenBSD: i82596.c,v 1.41 2015/05/01 16:37:32 mpi Exp $ */
+/* $OpenBSD: i82596.c,v 1.42 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: i82586.c,v 1.18 1998/08/15 04:42:42 mycroft Exp $ */
/*-
resid = totlen;
MGETHDR(m0, M_DONTWAIT, MT_DATA);
- if (m0 == 0)
+ if (m0 == NULL)
return (0);
m0->m_pkthdr.len = totlen;
len = MHLEN;
totlen -= len;
if (totlen > 0) {
MGET(newm, M_DONTWAIT, MT_DATA);
- if (newm == 0)
+ if (newm == NULL)
goto bad;
len = MLEN;
m = m->m_next = newm;
m = i82596_get(sc, bstart, pktlen);
i82596_release_rbd_list(sc, bstart, bend);
- if (m == 0) {
+ if (m == NULL) {
sc->sc_arpcom.ac_if.if_ierrors++;
return (0);
}
}
IFQ_DEQUEUE(&ifp->if_snd, m0);
- if (m0 == 0)
+ if (m0 == NULL)
break;
/* We need to use m->m_pkthdr.len, so require the header */
-/* $OpenBSD: if_eg.c,v 1.36 2014/12/22 02:28:51 tedu Exp $ */
+/* $OpenBSD: if_eg.c,v 1.37 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: if_eg.c,v 1.26 1996/05/12 23:52:27 mycroft Exp $ */
/*
loop:
/* Dequeue the next datagram. */
IFQ_DEQUEUE(&ifp->if_snd, m0);
- if (m0 == 0)
+ if (m0 == NULL)
return;
ifp->if_flags |= IFF_OACTIVE;
/* Pull packet off interface. */
m = egget(sc, buf, len);
- if (m == 0) {
+ if (m == NULL) {
ifp->if_ierrors++;
return;
}
int len;
MGETHDR(m, M_DONTWAIT, MT_DATA);
- if (m == 0)
+ if (m == NULL)
return (0);
m->m_pkthdr.rcvif = ifp;
m->m_pkthdr.len = totlen;
while (totlen > 0) {
if (top) {
MGET(m, M_DONTWAIT, MT_DATA);
- if (m == 0) {
+ if (m == NULL) {
m_freem(top);
return (0);
}
-/* $OpenBSD: if_el.c,v 1.24 2014/12/22 02:28:51 tedu Exp $ */
+/* $OpenBSD: if_el.c,v 1.25 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: if_el.c,v 1.39 1996/05/12 23:52:32 mycroft Exp $ */
/*
IFQ_DEQUEUE(&ifp->if_snd, m0);
/* If there's nothing to send, return. */
- if (m0 == 0)
+ if (m0 == NULL)
break;
#if NBPFILTER > 0
/* Pull packet off interface. */
m = elget(sc, len);
- if (m == 0) {
+ if (m == NULL) {
ifp->if_ierrors++;
return;
}
int len;
MGETHDR(m, M_DONTWAIT, MT_DATA);
- if (m == 0)
+ if (m == NULL)
return 0;
m->m_pkthdr.rcvif = ifp;
m->m_pkthdr.len = totlen;
while (totlen > 0) {
if (top) {
MGET(m, M_DONTWAIT, MT_DATA);
- if (m == 0) {
+ if (m == NULL) {
m_freem(top);
return 0;
}
-/* $OpenBSD: if_ie.c,v 1.40 2014/12/22 02:28:51 tedu Exp $ */
+/* $OpenBSD: if_ie.c,v 1.41 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: if_ie.c,v 1.51 1996/05/12 23:52:48 mycroft Exp $ */
/*-
}
MGETHDR(m, M_DONTWAIT, MT_DATA);
- if (m == 0)
+ if (m == NULL)
return 0;
m->m_pkthdr.rcvif = &sc->sc_arpcom.ac_if;
m->m_pkthdr.len = totlen;
while (totlen > 0) {
if (top) {
MGET(m, M_DONTWAIT, MT_DATA);
- if (m == 0) {
+ if (m == NULL) {
m_freem(top);
return 0;
}
int num; /* frame number to read */
{
int status;
- struct mbuf *m = 0;
+ struct mbuf *m = NULL;
struct ether_header eh;
#if NBPFILTER > 0
int bpf_gets_it = 0;
#endif
ie_drop_packet_buffer(sc);
}
- if (m == 0) {
+ if (m == NULL) {
sc->sc_arpcom.ac_if.if_ierrors++;
return;
}
}
IFQ_DEQUEUE(&ifp->if_snd, m0);
- if (m0 == 0)
+ if (m0 == NULL)
break;
/* We need to use m->m_pkthdr.len, so require the header */
-/* $OpenBSD: if_cnw.c,v 1.27 2015/03/14 03:38:49 jsg Exp $ */
+/* $OpenBSD: if_cnw.c,v 1.28 2015/05/13 10:42:46 jsg Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
}
IFQ_DEQUEUE(&ifp->if_snd, m0);
- if (m0 == 0)
+ if (m0 == NULL)
return;
#if NBPFILTER > 0
bufptr = 0; /* XXX make gcc happy */
MGETHDR(m, M_DONTWAIT, MT_DATA);
- if (m == 0)
+ if (m == NULL)
return (0);
m->m_pkthdr.rcvif = &sc->sc_arpcom.ac_if;
m->m_pkthdr.len = totbytes;
while (totbytes > 0) {
if (top) {
MGET(m, M_DONTWAIT, MT_DATA);
- if (m == 0) {
+ if (m == NULL) {
m_freem(top);
return (0);
}
CNW_CMD0(sc, CNW_CMD_SRP);
/* Did we manage to get the packet from the interface? */
- if (m == 0) {
+ if (m == NULL) {
++ifp->if_ierrors;
return;
}
-/* $OpenBSD: if_xe.c,v 1.47 2015/03/14 03:38:49 jsg Exp $ */
+/* $OpenBSD: if_xe.c,v 1.48 2015/05/13 10:42:46 jsg Exp $ */
/*
* Copyright (c) 1999 Niklas Hallqvist, Brandon Creighton, Job de Haas
recvcount += pktlen;
MGETHDR(m, M_DONTWAIT, MT_DATA);
- if (m == 0)
+ if (m == NULL)
return (recvcount);
m->m_pkthdr.rcvif = ifp;
m->m_pkthdr.len = pktlen;
while (pktlen > 0) {
if (top) {
MGET(m, M_DONTWAIT, MT_DATA);
- if (m == 0) {
+ if (m == NULL) {
m_freem(top);
return (recvcount);
}
/* Peek at the next packet. */
IFQ_POLL(&ifp->if_snd, m0);
- if (m0 == 0)
+ if (m0 == NULL)
return;
/* We need to use m->m_pkthdr.len, so require the header. */
-/* $OpenBSD: be.c,v 1.29 2015/04/07 14:59:06 mpi Exp $ */
+/* $OpenBSD: be.c,v 1.30 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: be.c,v 1.26 2001/03/20 15:39:20 pk Exp $ */
/*-
for (;;) {
IFQ_DEQUEUE(&ifp->if_snd, m);
- if (m == 0)
+ if (m == NULL)
break;
#if NBPFILTER > 0
-/* $OpenBSD: sys_socket.c,v 1.19 2014/07/13 15:52:38 tedu Exp $ */
+/* $OpenBSD: sys_socket.c,v 1.20 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: sys_socket.c,v 1.13 1995/08/12 23:59:09 mycroft Exp $ */
/*
soo_read(struct file *fp, off_t *poff, struct uio *uio, struct ucred *cred)
{
- return (soreceive((struct socket *)fp->f_data, (struct mbuf **)0,
- uio, (struct mbuf **)0, (struct mbuf **)0, (int *)0,
+ return (soreceive((struct socket *)fp->f_data, (struct mbuf **)NULL,
+ uio, (struct mbuf **)NULL, (struct mbuf **)NULL, (int *)NULL,
(socklen_t)0));
}
soo_write(struct file *fp, off_t *poff, struct uio *uio, struct ucred *cred)
{
- return (sosend((struct socket *)fp->f_data, (struct mbuf *)0,
- uio, (struct mbuf *)0, (struct mbuf *)0, 0));
+ return (sosend((struct socket *)fp->f_data, (struct mbuf *)NULL,
+ uio, (struct mbuf *)NULL, (struct mbuf *)NULL, 0));
}
int
if (IOCGROUP(cmd) == 'r')
return (rtioctl(cmd, data, p));
return ((*so->so_proto->pr_usrreq)(so, PRU_CONTROL,
- (struct mbuf *)cmd, (struct mbuf *)data, (struct mbuf *)0, p));
+ (struct mbuf *)cmd, (struct mbuf *)data, (struct mbuf *)NULL, p));
}
int
-/* $OpenBSD: bpf.c,v 1.118 2015/02/10 21:56:10 miod Exp $ */
+/* $OpenBSD: bpf.c,v 1.119 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */
/*
m = src_arg;
dst = dst_arg;
while (len > 0) {
- if (m == 0)
+ if (m == NULL)
panic("bpf_mcopy");
count = min(m->m_len, len);
bcopy(mtod(m, caddr_t), (caddr_t)dst, count);
-/* $OpenBSD: bpf_filter.c,v 1.26 2014/09/19 11:43:31 otto Exp $ */
+/* $OpenBSD: bpf_filter.c,v 1.27 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: bpf_filter.c,v 1.12 1996/02/13 22:00:00 christos Exp $ */
/*
while (k >= len) { \
k -= len; \
m = m->m_next; \
- if (m == 0) \
+ if (m == NULL) \
return 0; \
len = m->m_len; \
} \
return EXTRACT_LONG(cp);
}
m0 = m->m_next;
- if (m0 == 0 || m0->m_len + len - k < 4)
+ if (m0 == NULL || m0->m_len + len - k < 4)
return 0;
*err = 0;
np = mtod(m0, u_char *);
return EXTRACT_SHORT(cp);
}
m0 = m->m_next;
- if (m0 == 0)
+ if (m0 == NULL)
return 0;
*err = 0;
return (cp[0] << 8) | mtod(m0, u_char *)[0];
-/* $OpenBSD: if_ppp.c,v 1.82 2015/04/10 13:58:20 dlg Exp $ */
+/* $OpenBSD: if_ppp.c,v 1.83 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: if_ppp.c,v 1.39 1997/05/17 21:11:59 christos Exp $ */
/*
* (This assumes M_LEADINGSPACE is always 0 for a cluster mbuf.)
*/
M_PREPEND(m0, PPP_HDRLEN, M_DONTWAIT);
- if (m0 == 0) {
+ if (m0 == NULL) {
error = ENOBUFS;
goto bad;
}
-/* $OpenBSD: raw_usrreq.c,v 1.18 2015/03/14 03:38:51 jsg Exp $ */
+/* $OpenBSD: raw_usrreq.c,v 1.19 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: raw_usrreq.c,v 1.11 1996/02/13 22:00:43 christos Exp $ */
/*
struct mbuf *n;
if ((n = m_copy(m, 0, (int)M_COPYALL)) != NULL) {
if (sbappendaddr(&last->so_rcv, src,
- n, (struct mbuf *)0) == 0)
+ n, (struct mbuf *)NULL) == 0)
/* should notify about lost packet */
m_freem(n);
else {
}
if (last) {
if (sbappendaddr(&last->so_rcv, src,
- m, (struct mbuf *)0) == 0)
+ m, (struct mbuf *)NULL) == 0)
m_freem(m);
else {
sorwakeup(last);
-/* $OpenBSD: rtsock.c,v 1.158 2015/05/05 09:41:43 mpi Exp $ */
+/* $OpenBSD: rtsock.c,v 1.159 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */
/*
desync_mbuf = rt_msg1(RTM_DESYNC, NULL);
if ((desync_mbuf != NULL) &&
(sbappendaddr(&rp->rcb_socket->so_rcv, &route_src,
- desync_mbuf, (struct mbuf *)0) != 0)) {
+ desync_mbuf, (struct mbuf *)NULL) != 0)) {
rop->flags &= ~ROUTECB_FLAG_DESYNC;
sorwakeup(rp->rcb_socket);
} else {
if ((n = m_copy(m, 0, (int)M_COPYALL)) != NULL) {
if (sbspace(&last->so_rcv) < (2 * MSIZE) ||
sbappendaddr(&last->so_rcv, sosrc,
- n, (struct mbuf *)0) == 0) {
+ n, (struct mbuf *)NULL) == 0) {
/*
* Flag socket as desync'ed and
* flush required
if (last) {
if (sbspace(&last->so_rcv) < (2 * MSIZE) ||
sbappendaddr(&last->so_rcv, sosrc,
- m, (struct mbuf *)0) == 0) {
+ m, (struct mbuf *)NULL) == 0) {
/* Flag socket as desync'ed and flush required */
sotoroutecb(last)->flags |=
ROUTECB_FLAG_DESYNC | ROUTECB_FLAG_FLUSH;
va_end(ap);
info.rti_info[RTAX_DST] = NULL; /* for error handling (goto flush) */
- if (m == 0 || ((m->m_len < sizeof(int32_t)) &&
+ if (m == NULL || ((m->m_len < sizeof(int32_t)) &&
(m = m_pullup(m, sizeof(int32_t))) == 0))
return (ENOBUFS);
if ((m->m_flags & M_PKTHDR) == 0)
m = NULL;
}
}
- if (m == 0)
+ if (m == NULL)
return (m);
m->m_pkthdr.len = m->m_len = hlen = len;
m->m_pkthdr.rcvif = NULL;
if (route_cb.any_count == 0)
return;
m = rt_msg1(type, rtinfo);
- if (m == 0)
+ if (m == NULL)
return;
rtm = mtod(m, struct rt_msghdr *);
rtm->rtm_flags = RTF_DONE | flags;
if (route_cb.any_count == 0)
return;
m = rt_msg1(RTM_IFINFO, NULL);
- if (m == 0)
+ if (m == NULL)
return;
ifm = mtod(m, struct if_msghdr *);
ifm->ifm_index = ifp->if_index;
if (route_cb.any_count == 0)
return;
m = rt_msg1(RTM_IFANNOUNCE, NULL);
- if (m == 0)
+ if (m == NULL)
return;
ifan = mtod(m, struct if_announcemsghdr *);
ifan->ifan_index = ifp->if_index;
-/* $OpenBSD: ip_icmp.c,v 1.132 2015/02/05 03:01:03 mpi Exp $ */
+/* $OpenBSD: ip_icmp.c,v 1.133 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */
/*
icmp_reflect(struct mbuf *m, struct mbuf **op, struct in_ifaddr *ia)
{
struct ip *ip = mtod(m, struct ip *);
- struct mbuf *opts = 0;
+ struct mbuf *opts = NULL;
struct sockaddr_in sin;
struct rtentry *rt;
int optlen = (ip->ip_hl << 2) - sizeof(struct ip);
-/* $OpenBSD: ip_input.c,v 1.248 2015/04/10 13:58:20 dlg Exp $ */
+/* $OpenBSD: ip_input.c,v 1.249 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
ipqe->ipqe_m = m;
ipqe->ipqe_ip = ip;
m = ip_reass(ipqe, fp);
- if (m == 0) {
+ if (m == NULL) {
return;
}
ipstat.ips_reassembled++;
-/* $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
}
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;
}
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;
-/* $OpenBSD: ip_output.c,v 1.279 2015/04/17 11:04:01 mikeb Exp $ */
+/* $OpenBSD: ip_output.c,v 1.280 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */
/*
mhlen = sizeof (struct ip);
for (off = hlen + len; off < ntohs(ip->ip_len); off += len) {
MGETHDR(m, M_DONTWAIT, MT_HEADER);
- if (m == 0) {
+ if (m == NULL) {
ipstat.ips_odropped++;
error = ENOBUFS;
goto sendorfree;
ip->ip_dst = p->ipopt_dst;
if (m->m_flags & M_EXT || m->m_data - optlen < m->m_pktdat) {
MGETHDR(n, M_DONTWAIT, MT_HEADER);
- if (n == 0)
+ if (n == NULL)
return (m);
M_MOVE_HDR(n, m);
n->m_pkthdr.len += optlen;
break;
case IP_PORTRANGE:
- if (m == 0 || m->m_len != sizeof(int))
+ if (m == NULL || m->m_len != sizeof(int))
error = EINVAL;
else {
optval = *mtod(m, int *);
#ifndef IPSEC
error = EOPNOTSUPP;
#else
- if (m == 0 || m->m_len != sizeof(int)) {
+ if (m == NULL || m->m_len != sizeof(int)) {
error = EINVAL;
break;
}
if (*pcbopt)
(void)m_free(*pcbopt);
*pcbopt = 0;
- if (m == (struct mbuf *)0 || m->m_len == 0) {
+ if (m == (struct mbuf *)NULL || m->m_len == 0) {
/*
* Only turning off any previous options.
*/
-/* $OpenBSD: ipsec_input.c,v 1.130 2015/04/17 11:04:02 mikeb Exp $ */
+/* $OpenBSD: ipsec_input.c,v 1.131 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
IPSEC_ISTAT(espstat.esps_input, ahstat.ahs_input,
ipcompstat.ipcomps_input);
- if (m == 0) {
+ if (m == NULL) {
DPRINTF(("ipsec_common_input(): NULL packet received\n"));
IPSEC_ISTAT(espstat.esps_hdrops, ahstat.ahs_hdrops,
ipcompstat.ipcomps_hdrops);
-/* $OpenBSD: tcp_input.c,v 1.289 2015/04/16 19:24:13 markus Exp $ */
+/* $OpenBSD: tcp_input.c,v 1.290 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */
/*
}
cnt -= m->m_len;
m = m->m_next;
- if (m == 0)
+ if (m == NULL)
break;
}
panic("tcp_pulloutofband");
-/* $OpenBSD: tcp_subr.c,v 1.141 2015/05/07 09:19:31 mikeb Exp $ */
+/* $OpenBSD: tcp_subr.c,v 1.142 2015/05/13 10:42:46 jsg Exp $ */
/* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */
/*
{
int tlen;
int win = 0;
- struct mbuf *m = 0;
- struct route *ro = 0;
+ struct mbuf *m = NULL;
+ struct route *ro = NULL;
struct tcphdr *th;
struct ip *ip;
#ifdef INET6
-/* $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 $ */
/*
*/
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 *);
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 *);
#ifndef IPSEC
error = EINVAL;
#else
- if (m == 0 || m->m_len != sizeof(int)) {
+ if (m == NULL || m->m_len != sizeof(int)) {
error = EINVAL;
break;
}
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;
}
-/* $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 $ */
/*
* for UDP and IP6 headers.
*/
M_PREPEND(m, hlen + sizeof(struct udphdr), M_DONTWAIT);
- if (m == 0) {
+ if (m == NULL) {
error = ENOBUFS;
goto releaseopt;
}