svn commit: r186198 - head/sys/netinet6

Kip Macy kmacy at FreeBSD.org
Tue Dec 16 23:56:25 UTC 2008


Author: kmacy
Date: Tue Dec 16 23:56:24 2008
New Revision: 186198
URL: http://svn.freebsd.org/changeset/base/186198

Log:
  * Compare pointer with NULL
  * Remove trailing whitespace (added in r186162)
  * Reduce indentation by rephrasing test
  
  Submitted by:	Christopher Mallon (christoph dot mallon at gmx dot de)

Modified:
  head/sys/netinet6/nd6_rtr.c

Modified: head/sys/netinet6/nd6_rtr.c
==============================================================================
--- head/sys/netinet6/nd6_rtr.c	Tue Dec 16 23:16:10 2008	(r186197)
+++ head/sys/netinet6/nd6_rtr.c	Tue Dec 16 23:56:24 2008	(r186198)
@@ -1331,16 +1331,15 @@ find_pfxlist_reachable_router(struct nd_
 	struct llentry *ln;
 	int canreach;
 
-	for (pfxrtr = LIST_FIRST(&pr->ndpr_advrtrs); pfxrtr;
+	for (pfxrtr = LIST_FIRST(&pr->ndpr_advrtrs); pfxrtr != NULL;
 	     pfxrtr = LIST_NEXT(pfxrtr, pfr_entry)) {
 		IF_AFDATA_LOCK(pfxrtr->router->ifp);
 		ln = nd6_lookup(&pfxrtr->router->rtaddr, 0, pfxrtr->router->ifp);
 		IF_AFDATA_UNLOCK(pfxrtr->router->ifp);
-		canreach = 0;		
-		if (ln != NULL) {			
-			canreach = ND6_IS_LLINFO_PROBREACH(ln);
-			LLE_RUNLOCK(ln);
-		}
+		if (ln == NULL)
+			continue;
+		canreach = ND6_IS_LLINFO_PROBREACH(ln);
+		LLE_RUNLOCK(ln);
 		if (canreach)
 			break;
 	}


More information about the svn-src-all mailing list