From: Jesper Juhl Date: Sun, 19 Jun 2005 06:00:00 +0000 (-0700) Subject: [IPV4]: [2/4] signed vs unsigned cleanup in net/ipv4/raw.c X-Git-Tag: v2.6.13-rc1~90^2~583^2~10 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=926d4b8122fb324de294a09a7d96d8af7cfc6861;p=linux-2.6 [IPV4]: [2/4] signed vs unsigned cleanup in net/ipv4/raw.c 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 Signed-off-by: David S. Miller --- diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 8d17dd3542..1fcb23d335 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c @@ -384,7 +384,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, int err; err = -EMSGSIZE; - if (len < 0 || len > 0xFFFF) + if (len > 0xFFFF) goto out; /*