diff options
author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2023-01-19 14:42:01 +0100 |
---|---|---|
committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2023-01-19 14:42:01 +0100 |
commit | ff9232c83bad982838e68fc0f9b7fbe8f77e0e02 (patch) | |
tree | e5a4ae77d758288c33f1c3d4ca44d76c4bf17387 /lib | |
parent | zebra: fix possible null dereference (diff) | |
download | frr-ff9232c83bad982838e68fc0f9b7fbe8f77e0e02.tar.xz frr-ff9232c83bad982838e68fc0f9b7fbe8f77e0e02.zip |
lib: remove dead logic code
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>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vrf.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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; } |