Date: Tue, 16 Dec 2008 02:30:42 +0000 (UTC) From: Kip Macy <kmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r186158 - head/sys/netinet6 Message-ID: <200812160230.mBG2UgNg023754@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812160230.mBG2UgNg023754>