]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net: neigh: remove redundant assignment to variable bucket
authorColin Ian King <colin.king@canonical.com>
Fri, 26 Jul 2019 09:46:11 +0000 (10:46 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 27 Jul 2019 20:32:06 +0000 (13:32 -0700)
The variable bucket is being initialized with a value that is never
read and it is being updated later with a new value in a following
for-loop. The initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/neighbour.c

index f79e61c570ea39b45b505dbe5a8c3c4e463456e0..5480edff0c8687a0b3a0e2dca90a83dc7ca52fe8 100644 (file)
@@ -3033,7 +3033,7 @@ static struct neighbour *neigh_get_first(struct seq_file *seq)
        struct net *net = seq_file_net(seq);
        struct neigh_hash_table *nht = state->nht;
        struct neighbour *n = NULL;
-       int bucket = state->bucket;
+       int bucket;
 
        state->flags &= ~NEIGH_SEQ_IS_PNEIGH;
        for (bucket = 0; bucket < (1 << nht->hash_shift); bucket++) {