neighbour: Remove redundant initialization of 'bucket'
Subsystems (2)
PATCH 1/1 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]
--- net/core/neighbour.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/neighbour.c +1 -1
@@ -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++) {
Signature · 1 line
1.8.3.1
This patch was applied to netdev/net-next.git (refs/heads/master):
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
Quoted 10 lines · On Sat, 8 May 2021 18:03:05 +0800 you wrote:
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][...]
Here is the summary with links:
- neighbour: Remove redundant initialization of 'bucket'
https://git.kernel.org/netdev/net-next/c/48de7c0c1c92
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html