list_compat.h: remove list_init_head()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
This commit is contained in:
parent
bbdfee8182
commit
d1e59653fa
3 changed files with 2 additions and 3 deletions
2
avl.c
2
avl.c
|
@ -90,7 +90,7 @@ static void avl_remove(struct avl_tree *tree, struct avl_node *node);
|
||||||
void
|
void
|
||||||
avl_init(struct avl_tree *tree, avl_tree_comp comp, bool allow_dups, void *ptr)
|
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->root = NULL;
|
||||||
tree->count = 0;
|
tree->count = 0;
|
||||||
tree->comp = comp;
|
tree->comp = comp;
|
||||||
|
|
2
avl.h
2
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) \
|
#define avl_remove_all_elements(tree, element, node_member, ptr) \
|
||||||
for (element = avl_first_element(tree, element, node_member), \
|
for (element = avl_first_element(tree, element, node_member), \
|
||||||
ptr = avl_next_element(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)->root = NULL; \
|
||||||
(tree)->count > 0; \
|
(tree)->count > 0; \
|
||||||
element = ptr, ptr = avl_next_element(ptr, node_member), (tree)->count--)
|
element = ptr, ptr = avl_next_element(ptr, node_member), (tree)->count--)
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
#ifndef __LIST_COMPAT_H
|
#ifndef __LIST_COMPAT_H
|
||||||
#define __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_head(_head, _list) list_add(_list, _head)
|
||||||
#define list_add_after(_after, _list) list_add(_list, _after)
|
#define list_add_after(_after, _list) list_add(_list, _after)
|
||||||
#define list_add_before(_before, _list) list_add_tail(_list, _before)
|
#define list_add_before(_before, _list) list_add_tail(_list, _before)
|
||||||
|
|
Loading…
Reference in a new issue