list_compat.h: remove list_init_head()
authorFelix Fietkau <nbd@openwrt.org>
Thu, 20 Mar 2014 21:56:31 +0000 (22:56 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 20 Mar 2014 21:56:45 +0000 (22:56 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
avl.c
avl.h
list_compat.h

diff --git a/avl.c b/avl.c
index 3efeaf53e7310c2934923cda7938b87a0fe88cd0..91b2bb87ac7f18f9be55791904a2b3ef5701e82d 100644 (file)
--- a/avl.c
+++ b/avl.c
@@ -90,7 +90,7 @@ static void avl_remove(struct avl_tree *tree, struct avl_node *node);
 void
 avl_init(struct avl_tree *tree, avl_tree_comp comp, bool allow_dups, void *ptr)
 {
-  list_init_head(&tree->list_head);
+  INIT_LIST_HEAD(&tree->list_head);
   tree->root = NULL;
   tree->count = 0;
   tree->comp = comp;
diff --git a/avl.h b/avl.h
index 2591de342e4b8c32c540bc52ca84ee4b597272b2..8323246e14cd2acd3ad7513fcb310036f3c81e68 100644 (file)
--- a/avl.h
+++ b/avl.h
@@ -534,7 +534,7 @@ __avl_find_element(const struct avl_tree *tree, const void *key, size_t offset,
 #define avl_remove_all_elements(tree, element, node_member, ptr) \
   for (element = avl_first_element(tree, element, node_member), \
        ptr = avl_next_element(element, node_member), \
-       list_init_head(&(tree)->list_head), \
+       INIT_LIST_HEAD(&(tree)->list_head), \
        (tree)->root = NULL; \
        (tree)->count > 0; \
        element = ptr, ptr = avl_next_element(ptr, node_member), (tree)->count--)
index bfa12c19bbb86b0c790fc83c657f2663a9e080ea..3dd1fd681c9c90211d7931ce94713d18572de917 100644 (file)
@@ -17,7 +17,6 @@
 #ifndef __LIST_COMPAT_H
 #define __LIST_COMPAT_H
 
-#define list_init_head(_list)                  INIT_LIST_HEAD(_list)
 #define list_add_head(_head, _list)            list_add(_list, _head)
 #define list_add_after(_after, _list)          list_add(_list, _after)
 #define list_add_before(_before, _list)                list_add_tail(_list, _before)