summaryrefslogtreecommitdiff
path: root/sys/net/if_bridge.c
diff options
context:
space:
mode:
authorBret Lambert <blambert@cvs.openbsd.org>2010-09-28 08:13:12 +0000
committerBret Lambert <blambert@cvs.openbsd.org>2010-09-28 08:13:12 +0000
commit8edd47916a1202c5ab3bc8fc728b344d80ab36b8 (patch)
tree9f03e4fe9cd1ff7c78c061ae94349e4684707caa /sys/net/if_bridge.c
parent563607bfd8a6b9ae9d5a4156b218f7098e9367f5 (diff)
replace hand-rolled infinite loop with LIST_FOREACH
ok claudio@ guenther@
Diffstat (limited to 'sys/net/if_bridge.c')
-rw-r--r--sys/net/if_bridge.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index ffbe4316646..6197e74aeec 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bridge.c,v 1.183 2010/09/24 15:22:29 blambert Exp $ */
+/* $OpenBSD: if_bridge.c,v 1.184 2010/09/28 08:13:11 blambert Exp $ */
/*
* Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net)
@@ -2018,8 +2018,7 @@ bridge_rtagenode(struct ifnet *ifp, int age)
bridge_rtdelete(sc, ifp, 1);
else {
for (i = 0; i < BRIDGE_RTABLE_SIZE; i++) {
- n = LIST_FIRST(&sc->sc_rts[i]);
- while (n != LIST_END(&sc->sc_rts[i])) {
+ LIST_FOREACH(n, &sc->sc_rts[i], brt_next) {
/* Cap the expiry time to 'age' */
if (n->brt_if == ifp &&
n->brt_age > time_uptime + age &&