summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorYang Li <yang.lee@linux.alibaba.com>2021-05-08 18:03:05 +0800
committerDavid S. Miller <davem@davemloft.net>2021-05-10 14:25:13 -0700
commit48de7c0c1c9225b478c602184be8e00b92b35c61 (patch)
treef230cc3c7dcb8d07cd72d04ffcecb3e31c921c58 /net/core
parentd2792e91de2bedf829828b091720f0f7920719ed (diff)
neighbour: Remove redundant initialization of 'bucket'
Integer variable 'bucket' is being initialized however this value is never read as 'bucket' is assigned zero in for statement. Remove the redundant assignment. Cleans up clang warning: net/core/neighbour.c:3144:6: warning: Value stored to 'bucket' during its initialization is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/neighbour.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 98f20efbfadf..2b2f333bcdfe 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -3141,7 +3141,7 @@ static struct pneigh_entry *pneigh_get_first(struct seq_file *seq)
struct net *net = seq_file_net(seq);
struct neigh_table *tbl = state->tbl;
struct pneigh_entry *pn = NULL;
- int bucket = state->bucket;
+ int bucket;
state->flags |= NEIGH_SEQ_IS_PNEIGH;
for (bucket = 0; bucket <= PNEIGH_HASHMASK; bucket++) {