summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_te.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_te.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_te.c')
-rw-r--r--ospfd/ospf_te.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c
index f45682c77..12122e764 100644
--- a/ospfd/ospf_te.c
+++ b/ospfd/ospf_te.c
@@ -897,10 +897,6 @@ static int ospf_mpls_te_del_if(struct interface *ifp)
/* Dequeue listnode entry from the list. */
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);
}