]> git.puffer.fish Git - mirror/frr.git/commit
zebra: dead code (Coverity 1465497) 3119/head
authorF. Aragon <paco@voltanet.io>
Tue, 2 Oct 2018 09:05:40 +0000 (11:05 +0200)
committerF. Aragon <paco@voltanet.io>
Tue, 2 Oct 2018 13:45:44 +0000 (15:45 +0200)
commitb5891e154b6b06296678d9c8297851e931752b49
treee4a1412f969dc3dcdfa6d30c12fcb471a7fad880
parent2268d8cfe787fd09247768795c20e9ce9eccd402
zebra: dead code (Coverity 1465497)

The condition in the do/while is always false because 'return_nsid' cannot
reach the end of the loop with 'return_nsid' having a different value than
NS_UNKNOWN. Because of that, the condition can be replaced with 0 (false).
Also, the loop can be removed because the two assignments made at the end
of the loop before the condition check are not used (detected via Clang,
afterwards).

Signed-off-by: F. Aragon <paco@voltanet.io>
zebra/zebra_netns_id.c