aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-08-19 13:37:57 -0400
committerJeff Garzik <jeff@garzik.org>2006-08-24 00:37:04 -0400
commitcb958186ed543d1a4f074ceb1c783fe8b0908437 (patch)
tree852a5b70ff626b7b9dbf1c1e6da5a65b55cb40c7 /drivers/net
parenta76b044af147135b5fb7570aba35d4908f143cc9 (diff)
[PATCH] Signedness issue in drivers/net/3c515.c
while playing with gcc 4.1 -Wextra warnings, I came across this one: drivers/net/3c515.c:1027: warning: comparison of unsigned expression >= 0 is always true Since i is unsigned the >= 0 check in the for loop is always true, so we might spin there forever unless the if condition triggers. Since i is only used in this loop, this patch changes it to an integer. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/3c515.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/3c515.c b/drivers/net/3c515.c
index 4532b17e40ea..aedfddf20cb3 100644
--- a/drivers/net/3c515.c
+++ b/drivers/net/3c515.c
@@ -1003,7 +1003,8 @@ static int corkscrew_start_xmit(struct sk_buff *skb,
1003 /* Calculate the next Tx descriptor entry. */ 1003 /* Calculate the next Tx descriptor entry. */
1004 int entry = vp->cur_tx % TX_RING_SIZE; 1004 int entry = vp->cur_tx % TX_RING_SIZE;
1005 struct boom_tx_desc *prev_entry; 1005 struct boom_tx_desc *prev_entry;
1006 unsigned long flags, i; 1006 unsigned long flags;
1007 int i;
1007 1008
1008 if (vp->tx_full) /* No room to transmit with */ 1009 if (vp->tx_full) /* No room to transmit with */
1009 return 1; 1010 return 1;