list_compat.h: remove list_add_head()
[project/libubox.git] / avl.c
diff --git a/avl.c b/avl.c
index 3efeaf5..545fd2a 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;
@@ -225,7 +225,7 @@ avl_insert(struct avl_tree *tree, struct avl_node *new)
   new->leader = true;
 
   if (tree->root == NULL) {
-    list_add_head(&tree->list_head, &new->list);
+    list_add(&new->list, &tree->list_head);
     tree->root = new;
     tree->count = 1;
     return 0;