summaryrefslogtreecommitdiffstats
path: root/lib/linklist.c
diff options
context:
space:
mode:
authorPaul Jakma <paul.jakma@sun.com>2006-06-15 14:43:09 +0200
committerPaul Jakma <paul.jakma@sun.com>2006-06-15 14:43:09 +0200
commitc024fd0c76bc305cd6b6bab0989226bd9ec5e763 (patch)
treefabd937784fd330d046244a8febb418ca8663b5c /lib/linklist.c
parent[lib] Experimental: have XFREE NULL out the freed pointer (diff)
downloadfrr-c024fd0c76bc305cd6b6bab0989226bd9ec5e763.tar.xz
frr-c024fd0c76bc305cd6b6bab0989226bd9ec5e763.zip
[lib] list_delete shouldn't duplicate list_delete_all_node
2006-06-15 Paul Jakma <paul.jakma@sun.com> * linklist.c: (list_delete) call list_delete_all_node, don't duplicate it.
Diffstat (limited to 'lib/linklist.c')
-rw-r--r--lib/linklist.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/linklist.c b/lib/linklist.c
index 71c4db820..11e16a8a4 100644
--- a/lib/linklist.c
+++ b/lib/linklist.c
@@ -226,17 +226,8 @@ list_delete_all_node (struct list *list)
void
list_delete (struct list *list)
{
- struct listnode *node;
- struct listnode *next;
-
assert(list);
- for (node = list->head; node; node = next)
- {
- next = node->next;
- if (list->del)
- (*list->del) (node->data);
- listnode_free (node);
- }
+ list_delete_all_node (list);
list_free (list);
}