Commit 5418c692 authored by Jesper Juhl's avatar Jesper Juhl Committed by David S. Miller
Browse files

[IPV4]: [1/4] signed vs unsigned cleanup in net/ipv4/raw.c

This patch silences these two gcc -W warnings in net/ipv4/raw.c :

net/ipv4/raw.c:517: warning: signed and unsigned type in conditional expression
net/ipv4/raw.c:613: warning: signed and unsigned type in conditional expression

It doesn't change the behaviour of the code, simply writes the conditional 
expression with plain 'if()' syntax instead of '? :' , but since this 
breaks it into sepperate statements gcc no longer complains about having 
both a signed and unsigned value in the same conditional expression.
Signed-off-by: default avatarDavid S. Miller <>
parent 94df109a
......@@ -514,7 +514,10 @@ done:
out: return err < 0 ? err : len;
if (err < 0)
return err;
return len;
......@@ -610,7 +613,10 @@ static int raw_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
copied = skb->len;
skb_free_datagram(sk, skb);
out: return err ? err : copied;
if (err)
return err;
return copied;
static int raw_init(struct sock *sk)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment