Author: glebius Date: Thu Oct 13 13:33:23 2011 New Revision: 226340 URL: http://svn.freebsd.org/changeset/base/226340
Log: Use TAILQ_FOREACH() in the nd6_dad_find() instead of hand-rolled implementation. Modified: head/sys/netinet6/nd6_nbr.c Modified: head/sys/netinet6/nd6_nbr.c ============================================================================== --- head/sys/netinet6/nd6_nbr.c Thu Oct 13 13:30:41 2011 (r226339) +++ head/sys/netinet6/nd6_nbr.c Thu Oct 13 13:33:23 2011 (r226340) @@ -1167,11 +1167,11 @@ nd6_dad_find(struct ifaddr *ifa) { struct dadq *dp; - for (dp = V_dadq.tqh_first; dp; dp = dp->dad_list.tqe_next) { + TAILQ_FOREACH(dp, &V_dadq, dad_list) if (dp->dad_ifa == ifa) - return dp; - } - return NULL; + return (dp); + + return (NULL); } static void _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"