]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: remove deprecated list_delete()/list_free()
authorDavid Lamparter <equinox@opensourcerouting.org>
Tue, 2 Oct 2018 09:33:39 +0000 (11:33 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Tue, 2 Oct 2018 09:40:48 +0000 (11:40 +0200)
Deprecation time has passed.

Signed-off-by: David Lamparter <equinox@diac24.net>
lib/linklist.c
lib/linklist.h

index bee9d05a2c78332eea370e5491f0d07706401e18..baacd902035035f168c20180da27cee6701ff8eb 100644 (file)
@@ -248,11 +248,6 @@ void list_delete_and_null(struct list **list)
        *list = NULL;
 }
 
-void list_delete_original(struct list *list)
-{
-       list_delete_and_null(&list);
-}
-
 struct listnode *listnode_lookup(struct list *list, void *data)
 {
        struct listnode *node;
index f5cd44efb0f06318201ca48ffd98cbc21c2907db..53a5012e68cd465a301a58f989a800d88128ff3f 100644 (file)
@@ -235,20 +235,6 @@ extern struct list *list_dup(struct list *l);
 extern void list_sort(struct list *list,
                      int (*cmp)(const void **, const void **));
 
-/*
- * The usage of list_delete is being transitioned to pass in
- * the double pointer to remove use after free's.
- * list_free usage is deprecated, it leads to memory leaks
- * of the linklist nodes.  Please use list_delete_and_null
- *
- * In Oct of 2018, rename list_delete_and_null to list_delete
- * and remove list_delete_original and the list_delete #define
- * Additionally remove list_free entirely
- */
-#if CONFDATE > 20181001
-CPP_NOTICE("list_delete without double pointer is deprecated, please fixup")
-#endif
-
 /*
  * Delete a list and NULL its pointer.
  *
@@ -260,22 +246,6 @@ CPP_NOTICE("list_delete without double pointer is deprecated, please fixup")
  */
 extern void list_delete_and_null(struct list **plist);
 
-/*
- * Delete a list.
- *
- * If non-null, list->del is called with each data element.
- *
- * plist
- *    pointer to list pointer
- */
-extern void list_delete_original(struct list *list);
-#define list_delete(X)                                                         \
-       list_delete_original((X))                                              \
-               CPP_WARN("Please transition to using list_delete_and_null")
-#define list_free(X)                                                           \
-       list_delete_original((X))                                              \
-               CPP_WARN("Please transition tousing list_delete_and_null")
-
 /*
  * Delete all nodes from a list without deleting the list itself.
  *