X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=src%2Favl.h;h=d30be0dd85cc7e5d5918b610da9f8446b08dd623;hb=7e625be7f6413059fd7176785758f22dfface48e;hp=1ca687be510b514a000cfc0b08a257e7d8a1c660;hpb=7ee54c4901ea66bd6f43dd04298449e5704ae6c0;p=netdata.git diff --git a/src/avl.h b/src/avl.h index 1ca687be..d30be0dd 100644 --- a/src/avl.h +++ b/src/avl.h @@ -56,16 +56,16 @@ typedef struct avl_tree_lock { * a is linked directly to the tree, so it has to * be properly allocated by the caller. */ -avl *avl_insert_lock(avl_tree_lock *t, avl *a); -avl *avl_insert(avl_tree *t, avl *a); +avl *avl_insert_lock(avl_tree_lock *t, avl *a) NEVERNULL WARNUNUSED; +avl *avl_insert(avl_tree *t, avl *a) NEVERNULL WARNUNUSED; /* Remove an element a from the AVL tree t * returns a pointer to the removed element * or NULL if an element equal to a is not found * (equal as returned by t->compar()) */ -avl *avl_remove_lock(avl_tree_lock *t, avl *a); -avl *avl_remove(avl_tree *t, avl *a); +avl *avl_remove_lock(avl_tree_lock *t, avl *a) WARNUNUSED; +avl *avl_remove(avl_tree *t, avl *a) WARNUNUSED; /* Find the element into the tree that equal to a * (equal as returned by t->compar()) @@ -80,7 +80,7 @@ void avl_init_lock(avl_tree_lock *t, int (*compar)(void *a, void *b)); void avl_init(avl_tree *t, int (*compar)(void *a, void *b)); -void avl_traverse_lock(avl_tree_lock *t, void (*callback)(void *entry, void *data), void *data); -void avl_traverse(avl_tree *t, void (*callback)(void *entry, void *data), void *data); +int avl_traverse_lock(avl_tree_lock *t, int (*callback)(void *entry, void *data), void *data); +int avl_traverse(avl_tree *t, int (*callback)(void *entry, void *data), void *data); #endif /* avl.h */