From 152656d8ef57dda11f8b84241de28bca410e891b Mon Sep 17 00:00:00 2001 From: Fredi Raspall Date: Mon, 31 May 2021 22:17:16 +0200 Subject: [PATCH] ospfd: replace iterator by RO version .. ..since it's used for read-only lookups. Signed-off-by: Fredi Raspall --- ospfd/ospf_ext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ospfd/ospf_ext.c b/ospfd/ospf_ext.c index 2d08eeece2..6c0d0a19d4 100644 --- a/ospfd/ospf_ext.c +++ b/ospfd/ospf_ext.c @@ -254,10 +254,10 @@ static uint32_t get_ext_link_instance_value(void) /* Lookup Extended Prefix/Links by ifp from OspfEXT struct iflist */ static struct ext_itf *lookup_ext_by_ifp(struct interface *ifp) { - struct listnode *node, *nnode; + struct listnode *node; struct ext_itf *exti; - for (ALL_LIST_ELEMENTS(OspfEXT.iflist, node, nnode, exti)) + for (ALL_LIST_ELEMENTS_RO(OspfEXT.iflist, node, exti)) if (exti->ifp == ifp) return exti;