]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: fix link_state_hash_cmp()
authorLouis Scalbert <louis.scalbert@6wind.com>
Thu, 28 Sep 2023 13:33:58 +0000 (15:33 +0200)
committerLouis Scalbert <louis.scalbert@6wind.com>
Thu, 28 Sep 2023 13:33:58 +0000 (15:33 +0200)
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: 8b531b1107 ("bgpd: store and send bgp link-state attributes")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
bgpd/bgp_attr.c

index 05cf63e053449238eb94789a5bacc489aa5a985e..808b98e41998f80315b684221f65a1c122a4e74d 100644 (file)
@@ -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;