svn commit: r186158 - head/sys/netinet6
Kip Macy
kmacy at FreeBSD.org
Tue Dec 16 02:30:43 UTC 2008
Author: kmacy
Date: Tue Dec 16 02:30:42 2008
New Revision: 186158
URL: http://svn.freebsd.org/changeset/base/186158
Log:
check return from lla_lookup against NULL not zero
Modified:
head/sys/netinet6/in6.c
head/sys/netinet6/in6_src.c
Modified: head/sys/netinet6/in6.c
==============================================================================
--- head/sys/netinet6/in6.c Tue Dec 16 02:06:26 2008 (r186157)
+++ head/sys/netinet6/in6.c Tue Dec 16 02:30:42 2008 (r186158)
@@ -1593,7 +1593,7 @@ in6_ifinit(struct ifnet *ifp, struct in6
ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR | LLE_EXCLUSIVE),
(struct sockaddr *)&ia->ia_addr);
IF_AFDATA_UNLOCK(ifp);
- if (ln) {
+ if (ln != NULL) {
ln->la_expire = 0; /* for IPv6 this means permanent */
ln->ln_state = ND6_LLINFO_REACHABLE;
LLE_WUNLOCK(ln);
Modified: head/sys/netinet6/in6_src.c
==============================================================================
--- head/sys/netinet6/in6_src.c Tue Dec 16 02:06:26 2008 (r186157)
+++ head/sys/netinet6/in6_src.c Tue Dec 16 02:30:42 2008 (r186158)
@@ -574,7 +574,7 @@ selectroute(struct sockaddr_in6 *dstsock
IF_AFDATA_LOCK(ifp);
la = lla_lookup(LLTABLE6(ifp), 0, (struct sockaddr *)&sin6_next->sin6_addr);
IF_AFDATA_UNLOCK(ifp);
- if (la)
+ if (la != NULL)
LLE_RUNLOCK(la);
else {
error = EHOSTUNREACH;
More information about the svn-src-head
mailing list