diff options
author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2008-07-20 12:31:36 +0000 |
---|---|---|
committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2008-07-20 12:31:36 +0000 |
commit | 8699ea087e5e1a01dcee44ee0ebb1ac6f19ab458 (patch) | |
tree | 44bd822ebd20785cb4e2a557b7bb3b49d8934d3d /sys/netinet/in_pcb.c | |
parent | fdec4b41903cef11fd1dbfc80eef3bceebaac18a (diff) | |
download | src-8699ea087e5e1a01dcee44ee0ebb1ac6f19ab458.tar.gz src-8699ea087e5e1a01dcee44ee0ebb1ac6f19ab458.zip |
ia is a pointer thus use NULL rather then 0 for initialization and
in comparisons to make this more obvious.
MFC after: 5 days
Notes
Notes:
svn path=/head/; revision=180629
Diffstat (limited to 'sys/netinet/in_pcb.c')
-rw-r--r-- | sys/netinet/in_pcb.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 4d7ceff63617..9728a589af38 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -598,7 +598,7 @@ in_pcbconnect_setup(struct inpcb *inp, struct sockaddr *nam, &in_ifaddrhead)->ia_broadaddr)->sin_addr; } if (laddr.s_addr == INADDR_ANY) { - ia = (struct in_ifaddr *)0; + ia = NULL; /* * If route is known our src addr is taken from the i/f, * else punt. @@ -615,16 +615,16 @@ in_pcbconnect_setup(struct inpcb *inp, struct sockaddr *nam, * network and try to find a corresponding interface to take * the source address from. */ - if (ia == 0) { + if (ia == NULL) { bzero(&sa, sizeof(sa)); sa.sin_addr = faddr; sa.sin_len = sizeof(sa); sa.sin_family = AF_INET; ia = ifatoia(ifa_ifwithdstaddr(sintosa(&sa))); - if (ia == 0) + if (ia == NULL) ia = ifatoia(ifa_ifwithnet(sintosa(&sa))); - if (ia == 0) + if (ia == NULL) return (ENETUNREACH); } /* @@ -643,7 +643,7 @@ in_pcbconnect_setup(struct inpcb *inp, struct sockaddr *nam, TAILQ_FOREACH(ia, &in_ifaddrhead, ia_link) if (ia->ia_ifp == ifp) break; - if (ia == 0) + if (ia == NULL) return (EADDRNOTAVAIL); } } |