summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authoreivind <eivind@FreeBSD.org>1999-12-21 11:14:12 +0000
committereivind <eivind@FreeBSD.org>1999-12-21 11:14:12 +0000
commit8befc1a2b84269c73c5f4bb55d5961c9c1e64866 (patch)
treeaa42526cc605d366c46f08ae42d166e1905b2fe7 /sys/netinet6
parentd6a0d6a22e9b0ac0457c1471bc84b9240b8b5242 (diff)
downloadFreeBSD-src-8befc1a2b84269c73c5f4bb55d5961c9c1e64866.zip
FreeBSD-src-8befc1a2b84269c73c5f4bb55d5961c9c1e64866.tar.gz
Change incorrect NULLs to 0s
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/icmp6.c2
-rw-r--r--sys/netinet6/in6_pcb.c14
-rw-r--r--sys/netinet6/ip6_output.c6
-rw-r--r--sys/netinet6/udp6_usrreq.c9
4 files changed, 16 insertions, 15 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index 943ddf7..f7d03cd 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -1070,7 +1070,7 @@ icmp6_rip6_input(mp, off)
LIST_FOREACH(in6p, &ripcb, inp_list)
{
- if ((in6p->inp_vflag & INP_IPV6) == NULL)
+ if ((in6p->inp_vflag & INP_IPV6) == 0)
continue;
if (in6p->in6p_ip6_nxt != IPPROTO_ICMPV6)
continue;
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c
index 8d65ade..89db824 100644
--- a/sys/netinet6/in6_pcb.c
+++ b/sys/netinet6/in6_pcb.c
@@ -801,7 +801,7 @@ in6_mapped_sockaddr(struct socket *so, struct sockaddr **nam)
return EINVAL;
if (inp->inp_vflag & INP_IPV4) {
error = in_setsockaddr(so, nam);
- if (error == NULL)
+ if (error == 0)
in6_sin_2_v4mapsin6_in_sock(nam);
} else
error = in6_setsockaddr(so, nam);
@@ -819,7 +819,7 @@ in6_mapped_peeraddr(struct socket *so, struct sockaddr **nam)
return EINVAL;
if (inp->inp_vflag & INP_IPV4) {
error = in_setpeeraddr(so, nam);
- if (error == NULL)
+ if (error == 0)
in6_sin_2_v4mapsin6_in_sock(nam);
} else
error = in6_setpeeraddr(so, nam);
@@ -875,7 +875,7 @@ in6_pcbnotify(head, dst, fport_arg, laddr6, lport_arg, cmd, notify)
errno = inet6ctlerrmap[cmd];
s = splnet();
for (inp = LIST_FIRST(head); inp != NULL;) {
- if ((inp->inp_vflag & INP_IPV6) == NULL) {
+ if ((inp->inp_vflag & INP_IPV6) == 0) {
inp = LIST_NEXT(inp, inp_list);
continue;
}
@@ -919,7 +919,7 @@ in6_pcblookup_local(pcbinfo, laddr, lport_arg, wild_okay)
head = &pcbinfo->hashbase[INP_PCBHASH(INADDR_ANY, lport, 0,
pcbinfo->hashmask)];
LIST_FOREACH(inp, head, inp_hash) {
- if ((inp->inp_vflag & INP_IPV6) == NULL)
+ if ((inp->inp_vflag & INP_IPV6) == 0)
continue;
if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr) &&
IN6_ARE_ADDR_EQUAL(&inp->in6p_laddr, laddr) &&
@@ -957,7 +957,7 @@ in6_pcblookup_local(pcbinfo, laddr, lport_arg, wild_okay)
*/
LIST_FOREACH(inp, &phd->phd_pcblist, inp_portlist) {
wildcard = 0;
- if ((inp->inp_vflag & INP_IPV6) == NULL)
+ if ((inp->inp_vflag & INP_IPV6) == 0)
continue;
if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr))
wildcard++;
@@ -1060,7 +1060,7 @@ in6_pcblookup_hash(pcbinfo, faddr, fport_arg, laddr, lport_arg, wildcard, ifp)
lport, fport,
pcbinfo->hashmask)];
LIST_FOREACH(inp, head, inp_hash) {
- if ((inp->inp_vflag & INP_IPV6) == NULL)
+ if ((inp->inp_vflag & INP_IPV6) == 0)
continue;
if (IN6_ARE_ADDR_EQUAL(&inp->in6p_faddr, faddr) &&
IN6_ARE_ADDR_EQUAL(&inp->in6p_laddr, laddr) &&
@@ -1078,7 +1078,7 @@ in6_pcblookup_hash(pcbinfo, faddr, fport_arg, laddr, lport_arg, wildcard, ifp)
head = &pcbinfo->hashbase[INP_PCBHASH(INADDR_ANY, lport, 0,
pcbinfo->hashmask)];
LIST_FOREACH(inp, head, inp_hash) {
- if ((inp->inp_vflag & INP_IPV6) == NULL)
+ if ((inp->inp_vflag & INP_IPV6) == 0)
continue;
if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr) &&
inp->inp_lport == lport) {
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index b86f0fe..c5876f9 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -1161,10 +1161,10 @@ ip6_ctloutput(so, sopt)
struct mbuf *m;
error = soopt_getm(sopt, &m); /* XXX */
- if (error != NULL)
+ if (error != 0)
break;
error = soopt_mcopyin(sopt, m); /* XXX */
- if (error != NULL)
+ if (error != 0)
break;
return (ip6_pcbopts(&in6p->in6p_outputopts,
m, so, sopt));
@@ -2100,7 +2100,7 @@ ip6_mloopback(ifp, m, dst)
copym = m_copy(m, 0, M_COPYALL);
if (copym != NULL) {
- (void)if_simloop(ifp, copym, (struct sockaddr *)dst, NULL);
+ (void)if_simloop(ifp, copym, (struct sockaddr *)dst, 0);
}
}
diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c
index 30d8a73..137c3ee 100644
--- a/sys/netinet6/udp6_usrreq.c
+++ b/sys/netinet6/udp6_usrreq.c
@@ -226,7 +226,7 @@ udp6_input(mp, offp, proto)
*/
last = NULL;
LIST_FOREACH(in6p, &udb, inp_list) {
- if ((in6p->inp_vflag & INP_IPV6) == NULL)
+ if ((in6p->inp_vflag & INP_IPV6) == 0)
continue;
if (in6p->in6p_lport != uh->uh_dport)
continue;
@@ -407,6 +407,7 @@ udp6_ctlinput(cmd, sa, d)
sa->sa_len != sizeof(struct sockaddr_in6))
return;
+ off = 0;
if (!PRC_IS_REDIRECT(cmd) &&
((unsigned)cmd >= PRC_NCMDS || inet6ctlerrmap[cmd] == 0))
return;
@@ -665,7 +666,7 @@ udp6_bind(struct socket *so, struct sockaddr *nam, struct proc *p)
inp->inp_vflag &= ~INP_IPV4;
inp->inp_vflag |= INP_IPV6;
- if (ip6_mapped_addr_on && (inp->inp_flags & IN6P_BINDV6ONLY) == NULL) {
+ if (ip6_mapped_addr_on && (inp->inp_flags & IN6P_BINDV6ONLY) == 0) {
struct sockaddr_in6 *sin6_p;
sin6_p = (struct sockaddr_in6 *)nam;
@@ -714,7 +715,7 @@ udp6_connect(struct socket *so, struct sockaddr *nam, struct proc *p)
s = splnet();
error = in_pcbconnect(inp, (struct sockaddr *)&sin, p);
splx(s);
- if (error == NULL) {
+ if (error == 0) {
inp->inp_vflag |= INP_IPV4;
inp->inp_vflag &= ~INP_IPV6;
soisconnected(so);
@@ -733,7 +734,7 @@ udp6_connect(struct socket *so, struct sockaddr *nam, struct proc *p)
(htonl(ip6_flow_seq++) & IPV6_FLOWLABEL_MASK);
}
splx(s);
- if (error == NULL) {
+ if (error == 0) {
if (ip6_mapped_addr_on) { /* should be non mapped addr */
inp->inp_vflag &= ~INP_IPV4;
inp->inp_vflag |= INP_IPV6;
OpenPOWER on IntegriCloud