diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2001-12-10 06:10:54 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2001-12-10 06:10:54 +0000 |
commit | d8191d98a2bdc19162af3d513307c13f7af19e0c (patch) | |
tree | e82ca94786e5488e57d401c5ded4812ef9eac561 /sys/net/if_spppsubr.c | |
parent | 17b1ac72885b865246a857a583fb7e12d8b3a0de (diff) |
use queue.h macros for TAILQ operations
Diffstat (limited to 'sys/net/if_spppsubr.c')
-rw-r--r-- | sys/net/if_spppsubr.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index 4e31e983b8c..c45ec27d7d3 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_spppsubr.c,v 1.10 2001/07/10 11:09:07 espie Exp $ */ +/* $OpenBSD: if_spppsubr.c,v 1.11 2001/12/10 06:10:53 jason Exp $ */ /* * Synchronous PPP/Cisco link level subroutines. * Keepalive protocol implemented in both Cisco and PPP modes. @@ -3903,16 +3903,17 @@ sppp_get_ip_addrs(struct sppp *sp, u_long *src, u_long *dst, u_long *srcmask) ifa; ifa = ifa->ifa_link.tqe_next) #else - for (ifa = ifp->if_addrlist.tqh_first, si = 0; - ifa; - ifa = ifa->ifa_list.tqe_next) + si = 0; + TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) #endif + { if (ifa->ifa_addr->sa_family == AF_INET) { si = (struct sockaddr_in *)ifa->ifa_addr; sm = (struct sockaddr_in *)ifa->ifa_netmask; if (si) break; } + } if (ifa) { if (si && si->sin_addr.s_addr) { ssrc = si->sin_addr.s_addr; @@ -3949,9 +3950,8 @@ sppp_set_ip_addr(struct sppp *sp, u_long src) ifa; ifa = ifa->ifa_link.tqe_next) #else - for (ifa = ifp->if_addrlist.tqh_first, si = 0; - ifa; - ifa = ifa->ifa_list.tqe_next) + si = 0; + TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) #endif { if (ifa->ifa_addr->sa_family == AF_INET) |