[TIPC]: Fix two minor sparse warnings.
authorFlorian Westphal <fw@strlen.de>
Fri, 3 Aug 2007 02:28:06 +0000 (19:28 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 3 Aug 2007 02:42:31 +0000 (19:42 -0700)
fix two warnings generated by sparse:

link.c:2386 symbol 'msgcount' shadows an earlier one
node.c:244 symbol 'addr_string' shadows an earlier one

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/link.c
net/tipc/node.c

index 1d674e0848fa4d475cd5a391c4b3c382d83c7de9..1b17fecee74784cd2a2f701a374eb0769607fb29 100644 (file)
@@ -2383,10 +2383,10 @@ void tipc_link_changeover(struct link *l_ptr)
                struct tipc_msg *msg = buf_msg(crs);
 
                if ((msg_user(msg) == MSG_BUNDLER) && split_bundles) {
-                       u32 msgcount = msg_msgcnt(msg);
                        struct tipc_msg *m = msg_get_wrapped(msg);
                        unchar* pos = (unchar*)m;
 
+                       msgcount = msg_msgcnt(msg);
                        while (msgcount--) {
                                msg_set_seqno(m,msg_seqno(msg));
                                tipc_link_tunnel(l_ptr, &tunnel_hdr, m,
index e2e452a62ba181238399c7fc3ddc730cd07e8100..598f4d3a0098e4f9b1ba5ae5f166f5166db1e069 100644 (file)
@@ -241,8 +241,6 @@ struct node *tipc_node_attach_link(struct link *l_ptr)
                char addr_string[16];
 
                if (n_ptr->link_cnt >= 2) {
-                       char addr_string[16];
-
                        err("Attempt to create third link to %s\n",
                            addr_string_fill(addr_string, n_ptr->addr));
                        return NULL;