diff options
author | Jesper Juhl <juhl-lkml@dif.dk> | 2005-06-19 01:59:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-06-19 01:59:45 -0400 |
commit | 5418c6926fcb0e5a324cd5bc1106fc0941db7aae (patch) | |
tree | 0d5a679faaac6e424a7df345d0f491267d6b7792 /net/ipv4/raw.c | |
parent | 94df109a8c802263837baccc1a3eeab9ab9e88db (diff) |
[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>
Diffstat (limited to 'net/ipv4/raw.c')
-rw-r--r-- | net/ipv4/raw.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 8c1512021ee8..8d17dd3542df 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -514,7 +514,10 @@ done: | |||
514 | kfree(ipc.opt); | 514 | kfree(ipc.opt); |
515 | ip_rt_put(rt); | 515 | ip_rt_put(rt); |
516 | 516 | ||
517 | out: return err < 0 ? err : len; | 517 | out: |
518 | if (err < 0) | ||
519 | return err; | ||
520 | return len; | ||
518 | 521 | ||
519 | do_confirm: | 522 | do_confirm: |
520 | dst_confirm(&rt->u.dst); | 523 | dst_confirm(&rt->u.dst); |
@@ -610,7 +613,10 @@ static int raw_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
610 | copied = skb->len; | 613 | copied = skb->len; |
611 | done: | 614 | done: |
612 | skb_free_datagram(sk, skb); | 615 | skb_free_datagram(sk, skb); |
613 | out: return err ? err : copied; | 616 | out: |
617 | if (err) | ||
618 | return err; | ||
619 | return copied; | ||
614 | } | 620 | } |
615 | 621 | ||
616 | static int raw_init(struct sock *sk) | 622 | static int raw_init(struct sock *sk) |