diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2001-12-09 13:09:14 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2001-12-09 13:09:14 +0000 |
commit | 14e9b0fdbfd4bca452c7e94137ddf40ec572b4c3 (patch) | |
tree | 99417d616ac3297980976257980f96f693517770 /sys/net/if_ethersubr.c | |
parent | dcfe508c8abacb3ae0585db04662d330d31b2743 (diff) |
Use queue.h TAILQ macros instead of accessing members directly.
(And convert a few loops to TAILQ_FOREACH).
Diffstat (limited to 'sys/net/if_ethersubr.c')
-rw-r--r-- | sys/net/if_ethersubr.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 60a0dcdcb26..d3d08096f39 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ethersubr.c,v 1.59 2001/11/30 07:59:17 itojun Exp $ */ +/* $OpenBSD: if_ethersubr.c,v 1.60 2001/12/09 13:09:13 jason Exp $ */ /* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */ /* @@ -367,7 +367,7 @@ ether_output(ifp, m0, dst, rt0) */ aa = (struct at_ifaddr *)at_ifawithnet( (struct sockaddr_at *)dst, - ifp->if_addrlist.tqh_first); + TAILQ_FIRST(&ifp->if_addrlist)); if (aa == 0) goto bad; @@ -722,12 +722,11 @@ ether_input(ifp, eh, m) struct ifaddr *ifa; struct sockaddr_dl *sdl = NULL; - for (ifa = ifp->if_addrlist.tqh_first; ifa != 0; - ifa = ifa->ifa_list.tqe_next) + TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) { if ((sdl = (struct sockaddr_dl *)ifa->ifa_addr) && sdl->sdl_family == AF_LINK) break; - + } /* * If this is not a simplex interface, drop the packet * if it came from us. |