[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: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
94df109a8c
commit
5418c6926f
|
@ -514,7 +514,10 @@ done:
|
||||||
kfree(ipc.opt);
|
kfree(ipc.opt);
|
||||||
ip_rt_put(rt);
|
ip_rt_put(rt);
|
||||||
|
|
||||||
out: return err < 0 ? err : len;
|
out:
|
||||||
|
if (err < 0)
|
||||||
|
return err;
|
||||||
|
return len;
|
||||||
|
|
||||||
do_confirm:
|
do_confirm:
|
||||||
dst_confirm(&rt->u.dst);
|
dst_confirm(&rt->u.dst);
|
||||||
|
@ -610,7 +613,10 @@ static int raw_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
|
||||||
copied = skb->len;
|
copied = skb->len;
|
||||||
done:
|
done:
|
||||||
skb_free_datagram(sk, skb);
|
skb_free_datagram(sk, skb);
|
||||||
out: return err ? err : copied;
|
out:
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
return copied;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int raw_init(struct sock *sk)
|
static int raw_init(struct sock *sk)
|
||||||
|
|
Loading…
Reference in New Issue