From fda82299656ae0c3b0fd3783c61b65eaeae0a0a2 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Tue, 10 Jul 2018 14:34:44 +0200 Subject: [PATCH] lib: remove if_lookup_by_index portion of code with unknown vrf This function should be called with a known vrf_id. All other cases, the other API should be called. Signed-off-by: Philippe Guibert --- lib/if.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lib/if.c b/lib/if.c index 2541e6e45a..2320093a15 100644 --- a/lib/if.c +++ b/lib/if.c @@ -222,18 +222,6 @@ struct interface *if_lookup_by_index(ifindex_t ifindex, vrf_id_t vrf_id) struct vrf *vrf; struct interface if_tmp; - if (vrf_id == VRF_UNKNOWN) { - struct interface *ifp; - - RB_FOREACH (vrf, vrf_id_head, &vrfs_by_id) { - ifp = if_lookup_by_index(ifindex, vrf->vrf_id); - if (ifp) - return ifp; - } - - return NULL; - } - vrf = vrf_lookup_by_id(vrf_id); if (!vrf) return NULL; -- 2.39.5