netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] TIPC: fix two minor sparse warnings
@ 2007-08-02 22:57 Florian Westphal
  2007-08-03  2:28 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Westphal @ 2007-08-02 22:57 UTC (permalink / raw)
  To: netdev; +Cc: per.liden, jon.maloy, allan.stephens

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>
---
 net/tipc/link.c |    2 +-
 net/tipc/node.c |    2 --
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/net/tipc/link.c b/net/tipc/link.c
index 1d674e0..1b17fec 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -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,
diff --git a/net/tipc/node.c b/net/tipc/node.c
index e2e452a..598f4d3 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] TIPC: fix two minor sparse warnings
  2007-08-02 22:57 [PATCH] TIPC: fix two minor sparse warnings Florian Westphal
@ 2007-08-03  2:28 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-08-03  2:28 UTC (permalink / raw)
  To: fw; +Cc: netdev, per.liden, jon.maloy, allan.stephens

From: Florian Westphal <fw@strlen.de>
Date: Fri, 3 Aug 2007 00:57:56 +0200

> 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>

Looks good, applied, thanks Florian.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-03  2:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-02 22:57 [PATCH] TIPC: fix two minor sparse warnings Florian Westphal
2007-08-03  2:28 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).