From d5378bb6331bf1725f88a6b8a3698fd943fbdd63 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Thu, 13 Oct 2011 13:33:23 +0000 Subject: Use TAILQ_FOREACH() in the nd6_dad_find() instead of hand-rolled implementation. --- sys/netinet6/nd6_nbr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys') diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index fb8e37921283..0221c72b44e7 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -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 -- cgit v1.3