提交 926d4b81 编写于 作者: J Jesper Juhl 提交者: David S. Miller

[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: NJesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5418c692
......@@ -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;
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册