* [-mm PATCH][2/4] net: signed vs unsigned cleanup in net/ipv4/raw.c
@ 2005-06-15 21:30 Jesper Juhl
0 siblings, 0 replies; only message in thread
From: Jesper Juhl @ 2005-06-15 21:30 UTC (permalink / raw)
To: David S. Miller
Cc: Hideaki YOSHIFUJI, Alexey Kuznetsov, James Morris, Ross Biro,
netdev, linux-kernel
This patch gets rid of the following gcc -W warning in net/ipv4/raw.c :
net/ipv4/raw.c:387: warning: comparison of unsigned expression < 0 is always false
Since 'len' is of type size_t it is unsigned and can thus never be <0, and
since this is obvious from the function declaration just a few lines above
I think it's ok to remove the pointless check for len<0.
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
---
net/ipv4/raw.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.12-rc6-mm1/net/ipv4/raw.c.with_patch-1 2005-06-15 22:39:17.000000000 +0200
+++ linux-2.6.12-rc6-mm1/net/ipv4/raw.c 2005-06-15 22:39:36.000000000 +0200
@@ -384,7 +384,7 @@ static int raw_sendmsg(struct kiocb *ioc
int err;
err = -EMSGSIZE;
- if (len < 0 || len > 0xFFFF)
+ if (len > 0xFFFF)
goto out;
/*
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-06-15 21:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-15 21:30 [-mm PATCH][2/4] net: signed vs unsigned cleanup in net/ipv4/raw.c Jesper Juhl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).