summaryrefslogtreecommitdiffstats
path: root/sys/net/if.c
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2008-08-24 11:03:43 +0000
committerbz <bz@FreeBSD.org>2008-08-24 11:03:43 +0000
commit4e18e7c8f4389621030b64d990a22078f6d00056 (patch)
treedcc9eb6e5e45d3fb60cde6377a1493c84f1f9978 /sys/net/if.c
parent126d9ed0637984e41d484059dd63e0cf4c2077d6 (diff)
downloadFreeBSD-src-4e18e7c8f4389621030b64d990a22078f6d00056.zip
FreeBSD-src-4e18e7c8f4389621030b64d990a22078f6d00056.tar.gz
Make the checks for ptp interfaces in ifa_ifwithdstaddr() and
ifa_ifwithnet() look more similar by comparing the pointer to NULL in both cases. MFC after: 3 months
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index a3ef17d..11df979 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1154,7 +1154,7 @@ ifa_ifwithdstaddr(struct sockaddr *addr)
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != addr->sa_family)
continue;
- if (ifa->ifa_dstaddr &&
+ if (ifa->ifa_dstaddr != NULL &&
sa_equal(addr, ifa->ifa_dstaddr))
goto done;
}
@@ -1208,7 +1208,7 @@ next: continue;
* The trouble is that we don't know the
* netmask for the remote end.
*/
- if (ifa->ifa_dstaddr != 0 &&
+ if (ifa->ifa_dstaddr != NULL &&
sa_equal(addr, ifa->ifa_dstaddr))
goto done;
} else {
OpenPOWER on IntegriCloud