diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-03-05 21:48:58 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-03-05 21:48:58 +0000 |
commit | 52f635294dc2220b27898d3db1703c9464b92fb1 (patch) | |
tree | 5c2d6cca90a4bcc953c4c704201e7c2d7c08188e /sys/netipx/ipx.c | |
parent | 84fa77ca902d7934ca42a7fdd806497b643a8421 (diff) |
Use more queue macros rather than doing it by hand; ok otto@ krw@
Diffstat (limited to 'sys/netipx/ipx.c')
-rw-r--r-- | sys/netipx/ipx.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netipx/ipx.c b/sys/netipx/ipx.c index edd7dc7d378..559e45d50e5 100644 --- a/sys/netipx/ipx.c +++ b/sys/netipx/ipx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipx.c,v 1.13 2006/03/04 22:40:16 brad Exp $ */ +/* $OpenBSD: ipx.c,v 1.14 2006/03/05 21:48:57 miod Exp $ */ /*- * @@ -71,7 +71,7 @@ ipx_control(so, cmd, data, ifp) * Find address for this interface, if it exists. */ if (ifp) - for (ia = ipx_ifaddr.tqh_first; ia; ia = ia->ia_list.tqe_next) + TAILQ_FOREACH(ia, &ipx_ifaddr, ia_list) if (ia->ia_ifp == ifp) break; @@ -79,7 +79,8 @@ ipx_control(so, cmd, data, ifp) case SIOCAIFADDR: case SIOCDIFADDR: if (ifra->ifra_addr.sipx_family == AF_IPX) - for (; ia; ia = ia->ia_list.tqe_next) { + for (; ia != TAILQ_END(&ipx_ifaddr); + ia = TAILQ_NEXT(ia, ia_list)) { if (ia->ia_ifp == ifp && ipx_neteq(ia->ia_addr.sipx_addr, ifra->ifra_addr.sipx_addr)) @@ -294,7 +295,7 @@ ipx_iaonnetof(dst) struct ipx_ifaddr *ia_maybe = NULL; union ipx_net net = dst->ipx_net; - for (ia = ipx_ifaddr.tqh_first; ia; ia = ia->ia_list.tqe_next) { + TAILQ_FOREACH(ia, &ipx_ifaddr, ia_list) { if ((ifp = ia->ia_ifp)) { if (ifp->if_flags & IFF_POINTOPOINT) { compare = &satoipx_addr(ia->ia_dstaddr); |