mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 22:29:23 +00:00
Merge pull request #3083 from opensourcerouting/list-housekeeping
ospfd: remove unnecessary housekeeping code when using linked lists
This commit is contained in:
commit
491a11070f
@ -438,10 +438,6 @@ void ospf_delete_opaque_functab(uint8_t lsa_type, uint8_t opaque_type)
|
|||||||
/* Dequeue listnode entry from the list. */
|
/* Dequeue listnode entry from the list. */
|
||||||
listnode_delete(funclist, functab);
|
listnode_delete(funclist, functab);
|
||||||
|
|
||||||
/* Avoid misjudgement in the next lookup. */
|
|
||||||
if (listcount(funclist) == 0)
|
|
||||||
funclist->head = funclist->tail = NULL;
|
|
||||||
|
|
||||||
XFREE(MTYPE_OSPF_OPAQUE_FUNCTAB, functab);
|
XFREE(MTYPE_OSPF_OPAQUE_FUNCTAB, functab);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2122,10 +2118,6 @@ void ospf_opaque_lsa_flush_schedule(struct ospf_lsa *lsa0)
|
|||||||
/* Dequeue listnode entry from the list. */
|
/* Dequeue listnode entry from the list. */
|
||||||
listnode_delete(oipt->id_list, oipi);
|
listnode_delete(oipt->id_list, oipi);
|
||||||
|
|
||||||
/* Avoid misjudgement in the next lookup. */
|
|
||||||
if (listcount(oipt->id_list) == 0)
|
|
||||||
oipt->id_list->head = oipt->id_list->tail = NULL;
|
|
||||||
|
|
||||||
/* Disassociate internal control information with the given lsa. */
|
/* Disassociate internal control information with the given lsa. */
|
||||||
free_opaque_info_per_id((void *)oipi);
|
free_opaque_info_per_id((void *)oipi);
|
||||||
|
|
||||||
|
@ -380,10 +380,6 @@ static void unset_pce_domain(uint16_t type, uint32_t domain,
|
|||||||
if (found) {
|
if (found) {
|
||||||
listnode_delete(pce->pce_domain, old);
|
listnode_delete(pce->pce_domain, old);
|
||||||
|
|
||||||
/* Avoid misjudgement in the next lookup. */
|
|
||||||
if (listcount(pce->pce_domain) == 0)
|
|
||||||
pce->pce_domain->head = pce->pce_domain->tail = NULL;
|
|
||||||
|
|
||||||
/* Finally free the old domain */
|
/* Finally free the old domain */
|
||||||
XFREE(MTYPE_OSPF_PCE_PARAMS, old);
|
XFREE(MTYPE_OSPF_PCE_PARAMS, old);
|
||||||
}
|
}
|
||||||
@ -430,11 +426,6 @@ static void unset_pce_neighbor(uint16_t type, uint32_t domain,
|
|||||||
if (found) {
|
if (found) {
|
||||||
listnode_delete(pce->pce_neighbor, old);
|
listnode_delete(pce->pce_neighbor, old);
|
||||||
|
|
||||||
/* Avoid misjudgement in the next lookup. */
|
|
||||||
if (listcount(pce->pce_neighbor) == 0)
|
|
||||||
pce->pce_neighbor->head = pce->pce_neighbor->tail =
|
|
||||||
NULL;
|
|
||||||
|
|
||||||
/* Finally free the old domain */
|
/* Finally free the old domain */
|
||||||
XFREE(MTYPE_OSPF_PCE_PARAMS, old);
|
XFREE(MTYPE_OSPF_PCE_PARAMS, old);
|
||||||
}
|
}
|
||||||
|
@ -897,10 +897,6 @@ static int ospf_mpls_te_del_if(struct interface *ifp)
|
|||||||
/* Dequeue listnode entry from the list. */
|
/* Dequeue listnode entry from the list. */
|
||||||
listnode_delete(iflist, lp);
|
listnode_delete(iflist, lp);
|
||||||
|
|
||||||
/* Avoid misjudgement in the next lookup. */
|
|
||||||
if (listcount(iflist) == 0)
|
|
||||||
iflist->head = iflist->tail = NULL;
|
|
||||||
|
|
||||||
XFREE(MTYPE_OSPF_MPLS_TE, lp);
|
XFREE(MTYPE_OSPF_MPLS_TE, lp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user