summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_ri.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2018-09-24 22:42:03 +0200
committerRenato Westphal <renato@opensourcerouting.org>2018-09-24 22:47:38 +0200
commit962d3f8474d73505fbb35ad67cfb1d25787cd857 (patch)
tree0b757f728f9ab87346c75522972d6917a4a02633 /ospfd/ospf_ri.c
parentMerge pull request #3082 from donaldsharp/memory (diff)
downloadfrr-962d3f8474d73505fbb35ad67cfb1d25787cd857.tar.xz
frr-962d3f8474d73505fbb35ad67cfb1d25787cd857.zip
ospfd: remove unnecessary housekeeping code when using linked lists
The head and tail pointers of linked lists should never be modified manually, the linked list API guarantees that these pointers are always valid and up-to-date. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ospfd/ospf_ri.c')
-rw-r--r--ospfd/ospf_ri.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/ospfd/ospf_ri.c b/ospfd/ospf_ri.c
index e95fc43aa..22262c804 100644
--- a/ospfd/ospf_ri.c
+++ b/ospfd/ospf_ri.c
@@ -380,10 +380,6 @@ static void unset_pce_domain(uint16_t type, uint32_t domain,
if (found) {
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 */
XFREE(MTYPE_OSPF_PCE_PARAMS, old);
}
@@ -430,11 +426,6 @@ static void unset_pce_neighbor(uint16_t type, uint32_t domain,
if (found) {
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 */
XFREE(MTYPE_OSPF_PCE_PARAMS, old);
}