From 504b87e64062fc52fdedea4e35bb03467c8bf97f Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 2 Oct 2011 20:31:44 +0200 Subject: [PATCH] add vlist_for_each_element iterator --- utils.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils.h b/utils.h index 31fcd1f..d71a8f7 100644 --- a/utils.h +++ b/utils.h @@ -48,6 +48,9 @@ void vlist_delete(struct vlist_tree *tree, struct vlist_node *node); void vlist_flush(struct vlist_tree *tree); void vlist_flush_all(struct vlist_tree *tree); +#define vlist_for_each_element(tree, element, node_member) \ + avl_for_each_element(&(tree)->avl, element, node_member.avl) + #ifdef __linux__ static inline int fls(int x) { -- 2.25.1