Skip to content

Commit

Permalink
bgpd: fix link_state_hash_cmp()
Browse files Browse the repository at this point in the history
Fix comparaison of link state attributes pointers in
link_state_hash_cmp().

> CID 1568379 (#1 of 1): Logically dead code (DEADCODE)
> dead_error_line: Execution cannot reach this statement: return false;.

Fixes: 8b531b1 ("bgpd: store and send bgp link-state attributes")
Signed-off-by: Louis Scalbert <[email protected]>
  • Loading branch information
louis-6wind committed Sep 28, 2023
1 parent dae5791 commit 25408c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bgpd/bgp_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ static bool link_state_hash_cmp(const void *p1, const void *p2)

if (!link_state1 && link_state2)
return false;
if (!link_state1 && link_state2)
if (link_state1 && !link_state2)
return false;
if (!link_state1 && !link_state2)
return true;
Expand Down

0 comments on commit 25408c8

Please sign in to comment.