summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2001-12-11 05:13:38 +0000
committerJason Wright <jason@cvs.openbsd.org>2001-12-11 05:13:38 +0000
commitb57a46de1a5525113e9e2bf214b95cb0a9b5d15a (patch)
tree6135885caa2a9b0cc44c57606c2edc47ce641db2 /sys/net
parent04eb17710586d6b4c0b58260db35c7b704f95da3 (diff)
Use queue.h macros.
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_vlan.c11
-rw-r--r--sys/net/raw_usrreq.c4
2 files changed, 7 insertions, 8 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 9efc6a4a437..5ea018b84d9 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vlan.c,v 1.28 2001/10/05 06:32:34 drahn Exp $ */
+/* $OpenBSD: if_vlan.c,v 1.29 2001/12/11 05:13:37 jason Exp $ */
/*
* Copyright 1998 Massachusetts Institute of Technology
*
@@ -116,8 +116,8 @@ int vlan_setmulti(struct ifnet *ifp)
ifr_p = (struct ifreq *)&sc->ifv_p->if_data;
/* First, remove any existing filter entries. */
- while(sc->vlan_mc_listhead.slh_first != NULL) {
- mc = sc->vlan_mc_listhead.slh_first;
+ while (!SLIST_EMPTY(&sc->vlan_mc_listhead)) {
+ mc = SLIST_FIRST(&sc->vlan_mc_listhead);
error = ether_delmulti(ifr_p, &sc->ifv_ac);
if (error)
return(error);
@@ -528,9 +528,8 @@ vlan_unconfig(struct ifnet *ifp)
* while we were alive and remove them from the parent's list
* as well.
*/
- while(ifv->vlan_mc_listhead.slh_first != NULL) {
-
- mc = ifv->vlan_mc_listhead.slh_first;
+ while (!SLIST_EMPTY(&ifv->vlan_mc_listhead)) {
+ mc = SLIST_FIRST(&ifv->vlan_mc_listhead);
error = ether_delmulti(ifr_p, &ifv->ifv_ac);
error = ether_delmulti(ifr, &ifv->ifv_ac);
if (error)
diff --git a/sys/net/raw_usrreq.c b/sys/net/raw_usrreq.c
index c949c83d24d..bd97bb1e68b 100644
--- a/sys/net/raw_usrreq.c
+++ b/sys/net/raw_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raw_usrreq.c,v 1.3 1998/09/17 12:29:55 deraadt Exp $ */
+/* $OpenBSD: raw_usrreq.c,v 1.4 2001/12/11 05:13:37 jason Exp $ */
/* $NetBSD: raw_usrreq.c,v 1.11 1996/02/13 22:00:43 christos Exp $ */
/*
@@ -94,7 +94,7 @@ raw_input(m0, va_alist)
va_end(ap);
last = 0;
- for (rp = rawcb.lh_first; rp != 0; rp = rp->rcb_list.le_next) {
+ LIST_FOREACH(rp, &rawcb, rcb_list) {
if (rp->rcb_proto.sp_family != proto->sp_family)
continue;
if (rp->rcb_proto.sp_protocol &&