summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortsutsui <tsutsui@NetBSD.org>2008-08-10 16:21:28 +0000
committertsutsui <tsutsui@NetBSD.org>2008-08-10 16:21:28 +0000
commita856761fb49181d57bfbe13ddd6635239eae9099 (patch)
tree677108786a783dfa8734680e96f2992e4207f37b
parentdf91c0f20b1b31cff0cdc3bf92c840e8065aa2b6 (diff)
Use while(cond){} instead of for(;;){if(!cond)break;}.
-rw-r--r--sys/arch/sgimips/mace/if_mec.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/arch/sgimips/mace/if_mec.c b/sys/arch/sgimips/mace/if_mec.c
index 20817a4ac9c..fe9140054c9 100644
--- a/sys/arch/sgimips/mace/if_mec.c
+++ b/sys/arch/sgimips/mace/if_mec.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_mec.c,v 1.23 2008/08/10 16:18:43 tsutsui Exp $ */
+/* $NetBSD: if_mec.c,v 1.24 2008/08/10 16:21:28 tsutsui Exp $ */
/*-
* Copyright (c) 2004 Izumi Tsutsui. All rights reserved.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mec.c,v 1.23 2008/08/10 16:18:43 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mec.c,v 1.24 2008/08/10 16:21:28 tsutsui Exp $");
#include "opt_ddb.h"
#include "bpfilter.h"
@@ -830,18 +830,13 @@ mec_start(struct ifnet *ifp)
DPRINTF(MEC_DEBUG_START,
("mec_start: opending = %d, firsttx = %d\n", opending, firsttx));
- for (;;) {
+ while (sc->sc_txpending < MEC_NTXDESC - 1) {
/* Grab a packet off the queue. */
IFQ_POLL(&ifp->if_snd, m0);
if (m0 == NULL)
break;
m = NULL;
- if (sc->sc_txpending == MEC_NTXDESC - 1) {
- /* preserve the last entry to avoid wraparound */
- break;
- }
-
/*
* Get the next available transmit descriptor.
*/