mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 19:51:58 +00:00
Merge pull request #12665 from opensourcerouting/cs-misc
lib,zebra: fix null dereference and remove dead code
This commit is contained in:
commit
11f4fa6fe0
@ -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;
|
struct vrf *vrfp = (struct vrf *)args->list_entry;
|
||||||
|
|
||||||
if (vrfp->status == VRF_ACTIVE)
|
if (vrfp->status == VRF_ACTIVE)
|
||||||
return yang_data_new_bool(
|
return yang_data_new_bool(args->xpath, true);
|
||||||
args->xpath, vrfp->status == VRF_ACTIVE ? true : false);
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -1436,7 +1436,8 @@ static void zebra_if_netconf_update_ctx(struct zebra_dplane_ctx *ctx,
|
|||||||
if (IS_ZEBRA_DEBUG_KERNEL)
|
if (IS_ZEBRA_DEBUG_KERNEL)
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"%s: if %s(%u) zebra info pointer is NULL",
|
"%s: if %s(%u) zebra info pointer is NULL",
|
||||||
__func__, ifp->name, ifp->ifindex);
|
__func__, ifp ? ifp->name : "(null)",
|
||||||
|
ifp ? ifp->ifindex : ifindex);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (afi == AFI_IP) {
|
if (afi == AFI_IP) {
|
||||||
|
Loading…
Reference in New Issue
Block a user