summaryrefslogtreecommitdiff
path: root/net/decnet/af_decnet.c
diff options
context:
space:
mode:
authorHannes Eder <hannes@hanneseder.net>2009-02-25 10:32:39 +0000
committerDavid S. Miller <davem@davemloft.net>2009-02-26 23:13:35 -0800
commite57c624be8f99e56560fd2f4f485fe29f28dd74f (patch)
treeca39acaf5fe229c7a63c170d4fb4900ab8b4b35a /net/decnet/af_decnet.c
parent8521c27ee79533db444dcac291992b6bf8d61fc8 (diff)
decnet: fix sparse warnings: symbol shadows an earlier one
Impact: Remove redundant variable declarations, resp. rename inner scope variable. Fix this sparse warnings: net/decnet/af_decnet.c:1252:40: warning: symbol 'skb' shadows an earlier one net/decnet/af_decnet.c:1223:24: originally declared here net/decnet/af_decnet.c:1582:29: warning: symbol 'val' shadows an earlier one net/decnet/af_decnet.c:1527:22: originally declared here net/decnet/dn_dev.c:687:21: warning: symbol 'err' shadows an earlier one net/decnet/dn_dev.c:670:13: originally declared here net/decnet/sysctl_net_decnet.c:182:21: warning: symbol 'len' shadows an earlier one net/decnet/sysctl_net_decnet.c:173:16: originally declared here Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet/af_decnet.c')
-rw-r--r--net/decnet/af_decnet.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
index 963da86d4ecf..ec233b64f853 100644
--- a/net/decnet/af_decnet.c
+++ b/net/decnet/af_decnet.c
@@ -1246,11 +1246,12 @@ static int dn_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
case TIOCINQ:
lock_sock(sk);
- if ((skb = skb_peek(&scp->other_receive_queue)) != NULL) {
+ skb = skb_peek(&scp->other_receive_queue);
+ if (skb) {
amount = skb->len;
} else {
- struct sk_buff *skb = sk->sk_receive_queue.next;
- for(;;) {
+ skb = sk->sk_receive_queue.next;
+ for (;;) {
if (skb ==
(struct sk_buff *)&sk->sk_receive_queue)
break;
@@ -1579,16 +1580,16 @@ static int __dn_getsockopt(struct socket *sock, int level,int optname, char __us
default:
#ifdef CONFIG_NETFILTER
{
- int val, len;
+ int ret, len;
if(get_user(len, optlen))
return -EFAULT;
- val = nf_getsockopt(sk, PF_DECnet, optname,
+ ret = nf_getsockopt(sk, PF_DECnet, optname,
optval, &len);
- if (val >= 0)
- val = put_user(len, optlen);
- return val;
+ if (ret >= 0)
+ ret = put_user(len, optlen);
+ return ret;
}
#endif
case DSO_STREAM: