From 3b55aba1958c78b8838ce9ee5eed865d22d2787b Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Sun, 1 Mar 2020 01:19:55 -0500 Subject: [PATCH] lib: remove unnecessary null checks Signed-off-by: Quentin Young --- lib/if.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/if.c b/lib/if.c index 24b103b3ff..d4d9c4a5a4 100644 --- a/lib/if.c +++ b/lib/if.c @@ -1249,8 +1249,6 @@ struct if_link_params *if_link_params_get(struct interface *ifp) struct if_link_params *iflp = XCALLOC(MTYPE_IF_LINK_PARAMS, sizeof(struct if_link_params)); - if (iflp == NULL) - return NULL; /* Set TE metric equal to standard 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) { - if (ifp->link_params == NULL) - return; XFREE(MTYPE_IF_LINK_PARAMS, ifp->link_params); }