public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation•org>
To: "David S. Miller" <davem@davemloft•net>
Cc: akpm@linux-foundation•org, netdev@vger•kernel.org
Subject: [RFT 3/4] fib_trie: fix sparse warnings
Date: Fri, 27 Jul 2007 08:59:20 +0100	[thread overview]
Message-ID: <20070727080049.717355554@linux-foundation.org> (raw)
In-Reply-To: 20070727075917.470055328@linux-foundation.org

[-- Attachment #1: fib-trie-sparse.patch --]
[-- Type: text/plain, Size: 1265 bytes --]

There were a couple of places where sparse found declarations that covered
earlier declarations.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation•org>

--- a/net/ipv4/fib_trie.c	2007-07-27 08:41:46.000000000 +0100
+++ b/net/ipv4/fib_trie.c	2007-07-27 08:47:05.000000000 +0100
@@ -651,7 +651,6 @@ static struct node *resize(struct trie *
 
 static struct tnode *inflate(struct trie *t, struct tnode *tn)
 {
-	struct tnode *inode;
 	struct tnode *oldtnode = tn;
 	int olen = tnode_child_length(tn);
 	int i;
@@ -700,7 +699,7 @@ static struct tnode *inflate(struct trie
 
 	for (i = 0; i < olen; i++) {
 		struct node *node = tnode_get_child(oldtnode, i);
-		struct tnode *left, *right;
+		struct tnode *left, *right, *inode;
 		int size, j;
 
 		/* An empty child */
@@ -1049,7 +1048,7 @@ fib_insert_node(struct trie *t, int *err
 	/* Case 1: n is a leaf. Compare prefixes */
 
 	if (n != NULL && IS_LEAF(n) && tkey_equals(key, n->key)) {
-		struct leaf *l = (struct leaf *) n;
+		struct leaf *nl = (struct leaf *) n;
 
 		li = leaf_info_new(plen);
 
@@ -1059,7 +1058,7 @@ fib_insert_node(struct trie *t, int *err
 		}
 
 		fa_head = &li->falh;
-		insert_leaf_info(&l->list, li);
+		insert_leaf_info(&nl->list, li);
 		goto done;
 	}
 	t->size++;

-- 


  parent reply	other threads:[~2007-07-27  8:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-27  7:59 [RFT 0/4] fib_trie cleanup patches Stephen Hemminger
2007-07-27  7:59 ` [RFT 1/4] fib_trie: use inline for node_parent references Stephen Hemminger
2007-07-27  7:59 ` [RFT 2/4] fib_trie: convert macros to inline Stephen Hemminger
2007-07-27  7:59 ` Stephen Hemminger [this message]
2007-07-27  7:59 ` [RFT 4/4] fib_trie: whitespace cleanup Stephen Hemminger
2007-08-08 16:07 ` [RFT 0/4] fib_trie cleanup patches Robert Olsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070727080049.717355554@linux-foundation.org \
    --to=shemminger@linux-foundation$(echo .)org \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=davem@davemloft$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox