ospfd: replace iterator by RO version ..

..since it's used for read-only lookups.

Signed-off-by: Fredi Raspall <fredi@voltanet.io>
This commit is contained in:
Fredi Raspall 2021-05-31 22:17:16 +02:00 committed by Emanuele Di Pascale
parent d1db7359ad
commit 152656d8ef

View File

@ -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;