summaryrefslogtreecommitdiff
path: root/sys/compat/svr4/svr4_sockio.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-03-05 21:48:58 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-03-05 21:48:58 +0000
commit52f635294dc2220b27898d3db1703c9464b92fb1 (patch)
tree5c2d6cca90a4bcc953c4c704201e7c2d7c08188e /sys/compat/svr4/svr4_sockio.c
parent84fa77ca902d7934ca42a7fdd806497b643a8421 (diff)
Use more queue macros rather than doing it by hand; ok otto@ krw@
Diffstat (limited to 'sys/compat/svr4/svr4_sockio.c')
-rw-r--r--sys/compat/svr4/svr4_sockio.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/compat/svr4/svr4_sockio.c b/sys/compat/svr4/svr4_sockio.c
index 57f51d512ad..f814c312d6e 100644
--- a/sys/compat/svr4/svr4_sockio.c
+++ b/sys/compat/svr4/svr4_sockio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: svr4_sockio.c,v 1.9 2004/06/22 23:52:18 jfb Exp $ */
+/* $OpenBSD: svr4_sockio.c,v 1.10 2006/03/05 21:48:56 miod Exp $ */
/* $NetBSD: svr4_sockio.c,v 1.10 1996/05/03 17:09:15 christos Exp $ */
/*
@@ -109,13 +109,12 @@ svr4_sock_ioctl(fp, p, retval, fd, cmd, data)
* entry per physical interface?
*/
- for (ifp = ifnet.tqh_first;
- ifp != 0; ifp = ifp->if_list.tqe_next)
- if ((ifa = ifp->if_addrlist.tqh_first) == NULL)
+ TAILQ_FOREACH(ifp, &ifnet, if_list)
+ if (TAILQ_EMPTY(&ifp->if_addrlist))
ifnum++;
else
- for (;ifa != NULL;
- ifa = ifa->ifa_list.tqe_next)
+ TAILQ_FOREACH(ifa, &ifp->if_addrlist,
+ ifa_list)
ifnum++;