From 8ee15b10b0d7abb84bf7b98555da28cbd6d08fb0 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Wed, 25 Oct 2006 02:37:51 +0000 Subject: replace a few more instances of hand rolled code with the LIST_FOREACH macro. --- sys/dev/pci/if_nge.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sys/dev/pci/if_nge.c') diff --git a/sys/dev/pci/if_nge.c b/sys/dev/pci/if_nge.c index 00d0375e46b..03eaf8828ec 100644 --- a/sys/dev/pci/if_nge.c +++ b/sys/dev/pci/if_nge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nge.c,v 1.55 2006/05/28 00:20:21 brad Exp $ */ +/* $OpenBSD: if_nge.c,v 1.56 2006/10/25 02:37:50 brad Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 @@ -1907,9 +1907,8 @@ nge_ifmedia_mii_upd(ifp) sc->nge_link = 0; if (mii->mii_instance) { - struct mii_softc *miisc; - for (miisc = LIST_FIRST(&mii->mii_phys); miisc != NULL; - miisc = LIST_NEXT(miisc, mii_list)) + struct mii_softc *miisc; + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) mii_phy_reset(miisc); } mii_mediachg(mii); -- cgit v1.2.3