]> git.proxmox.com Git - mirror_frr.git/commitdiff
lib: remove dead logic code
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Thu, 19 Jan 2023 13:42:01 +0000 (10:42 -0300)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Thu, 19 Jan 2023 13:42:01 +0000 (10:42 -0300)
If we got inside the condition of `vrfp->status == VRF_ACTIVE` then
don't make the same check again.

Found by Coverity Scan (CID 1519760)

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
lib/vrf.c

index 5878c1734ff563e048272de9dfc483a7be51d0d0..2ac7ef7a970cb0dcdb3ba90b0e35c332cbad2e58 100644 (file)
--- a/lib/vrf.c
+++ b/lib/vrf.c
@@ -1000,8 +1000,7 @@ lib_vrf_state_active_get_elem(struct nb_cb_get_elem_args *args)
        struct vrf *vrfp = (struct vrf *)args->list_entry;
 
        if (vrfp->status == VRF_ACTIVE)
-               return yang_data_new_bool(
-                       args->xpath, vrfp->status == VRF_ACTIVE ? true : false);
+               return yang_data_new_bool(args->xpath, true);
 
        return NULL;
 }