mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-29 12:21:25 +00:00
lib: remove unnecessary null checks
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
eb728e0746
commit
3b55aba195
4
lib/if.c
4
lib/if.c
@ -1249,8 +1249,6 @@ struct if_link_params *if_link_params_get(struct interface *ifp)
|
|||||||
|
|
||||||
struct if_link_params *iflp =
|
struct if_link_params *iflp =
|
||||||
XCALLOC(MTYPE_IF_LINK_PARAMS, sizeof(struct if_link_params));
|
XCALLOC(MTYPE_IF_LINK_PARAMS, sizeof(struct if_link_params));
|
||||||
if (iflp == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
/* Set TE metric equal to standard metric */
|
/* Set TE metric equal to standard metric */
|
||||||
iflp->te_metric = ifp->metric;
|
iflp->te_metric = ifp->metric;
|
||||||
@ -1278,8 +1276,6 @@ struct if_link_params *if_link_params_get(struct interface *ifp)
|
|||||||
|
|
||||||
void if_link_params_free(struct interface *ifp)
|
void if_link_params_free(struct interface *ifp)
|
||||||
{
|
{
|
||||||
if (ifp->link_params == NULL)
|
|
||||||
return;
|
|
||||||
XFREE(MTYPE_IF_LINK_PARAMS, ifp->link_params);
|
XFREE(MTYPE_IF_LINK_PARAMS, ifp->link_params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user