summaryrefslogtreecommitdiff
path: root/rust/helpers/security.c
diff options
context:
space:
mode:
authorBreno Leitao <leitao@debian.org>2025-02-21 09:51:27 -0800
committerJakub Kicinski <kuba@kernel.org>2025-02-24 14:34:54 -0800
commit7183877d6853801258b7a8d3b51b415982e5097e (patch)
tree1dfb7abeeb2630f2c010b55e589887cf36589451 /rust/helpers/security.c
parent4859851ff6f7f01048ee2c3bedb423f3b109ee28 (diff)
net: Remove shadow variable in netdev_run_todo()
Fix a shadow variable warning in net/core/dev.c when compiled with CONFIG_LOCKDEP enabled. The warning occurs because 'dev' is redeclared inside the while loop, shadowing the outer scope declaration. net/core/dev.c:11211:22: warning: declaration shadows a local variable [-Wshadow] struct net_device *dev = list_first_entry(&unlink_list, net/core/dev.c:11202:21: note: previous declaration is here struct net_device *dev, *tmp; Remove the redundant declaration since the variable is already defined in the outer scope and will be overwritten in the subsequent list_for_each_entry_safe() loop anyway. Signed-off-by: Breno Leitao <leitao@debian.org> Reviewed-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20250221-netcons_fix_shadow-v1-1-dee20c8658dd@debian.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/helpers/security.c')
0 files changed, 0 insertions, 0 deletions