]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] Signedness issue in drivers/net/3c515.c
authorEric Sesterhenn <snakebyte@gmx.de>
Sat, 19 Aug 2006 17:37:57 +0000 (19:37 +0200)
committerJeff Garzik <jeff@garzik.org>
Thu, 24 Aug 2006 04:37:04 +0000 (00:37 -0400)
commit55228479c7d53f46950a12f8211231900dcf131f
tree852a5b70ff626b7b9dbf1c1e6da5a65b55cb40c7
parentecc2d29920a90bbb5c3147345ddd5d5a89c6c936
[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>
drivers/net/3c515.c