summaryrefslogtreecommitdiff
path: root/lib/if.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2020-03-01 01:19:55 -0500
committerQuentin Young <qlyoung@cumulusnetworks.com>2020-04-13 13:25:25 -0400
commit3b55aba1958c78b8838ce9ee5eed865d22d2787b (patch)
treeaf409af2b7660af6cee14be7c300efcf06c1d1b6 /lib/if.c
parenteb728e0746f241cbf95116485090eea741e632a3 (diff)
lib: remove unnecessary null checks
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/if.c')
-rw-r--r--lib/if.c4
1 files changed, 0 insertions, 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);
}