From 14e9b0fdbfd4bca452c7e94137ddf40ec572b4c3 Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Sun, 9 Dec 2001 13:09:14 +0000 Subject: Use queue.h TAILQ macros instead of accessing members directly. (And convert a few loops to TAILQ_FOREACH). --- sys/net/if_atmsubr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/net/if_atmsubr.c') diff --git a/sys/net/if_atmsubr.c b/sys/net/if_atmsubr.c index 10c13bbbb73..fa6bde0695b 100644 --- a/sys/net/if_atmsubr.c +++ b/sys/net/if_atmsubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_atmsubr.c,v 1.16 2001/06/27 06:07:38 kjc Exp $ */ +/* $OpenBSD: if_atmsubr.c,v 1.17 2001/12/09 13:09:13 jason Exp $ */ /* * @@ -359,10 +359,9 @@ atm_ifattach(ifp) ifp->if_output = atm_output; #if defined(__NetBSD__) || defined(__OpenBSD__) - for (ifa = ifp->if_addrlist.tqh_first; ifa != 0; - ifa = ifa->ifa_list.tqe_next) + TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) { #elif defined(__FreeBSD__) || defined(__bsdi__) - for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next) + for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next) { #endif if ((sdl = (struct sockaddr_dl *)ifa->ifa_addr) && @@ -374,4 +373,5 @@ atm_ifattach(ifp) #endif break; } + } } -- cgit v1.2.3