Use LIST_FOREACH instead of LIST_FOREACH_SAFE
No need to use *_SAFE because we don't remove any items in the loop.
This commit is contained in:
parent
6faa8aa178
commit
85320fb21e
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_bridge.c,v 1.108 2016/02/15 01:11:41 ozaki-r Exp $ */
|
||||
/* $NetBSD: if_bridge.c,v 1.109 2016/03/23 04:56:21 ozaki-r Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2001 Wasabi Systems, Inc.
|
||||
@ -80,7 +80,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.108 2016/02/15 01:11:41 ozaki-r Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.109 2016/03/23 04:56:21 ozaki-r Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_bridge_ipf.h"
|
||||
@ -2237,7 +2237,7 @@ bridge_rtdelete(struct bridge_softc *sc, struct ifnet *ifp)
|
||||
struct bridge_rtnode *brt, *nbrt;
|
||||
|
||||
BRIDGE_RT_LOCK(sc);
|
||||
LIST_FOREACH_SAFE(brt, &sc->sc_rtlist, brt_list, nbrt) {
|
||||
LIST_FOREACH(brt, &sc->sc_rtlist, brt_list, nbrt) {
|
||||
if (brt->brt_ifp == ifp)
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user