Date: Thu, 13 Oct 2011 13:33:23 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r226340 - head/sys/netinet6 Message-ID: <201110131333.p9DDXNP9017647@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110131333.p9DDXNP9017647>