X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;ds=sidebyside;f=utils.h;h=cbb57759978e544b23d47694cc59dc202779dd71;hb=301cf1c6f2c2b155c476e1fb861eeaa19c533222;hp=6500fdf80297b50841c06fc9e28c3e63c2c7e3dc;hpb=05c1f3b0c2058a579ca1a6e2b06329b8c814e5bd;p=project%2Fnetifd.git diff --git a/utils.h b/utils.h index 6500fdf..cbb5775 100644 --- a/utils.h +++ b/utils.h @@ -34,6 +34,9 @@ void __vlist_init(struct vlist_tree *tree, avl_tree_comp cmp, vlist_update_cb up #define vlist_init(tree, cmp, update, type, node, key) \ __vlist_init(tree, cmp, update, offsetof(type, key) - offsetof(type, node)) +#define vlist_find(tree, name, element, node_member) \ + avl_find_element(&(tree)->avl, name, element, node_member.avl) + static inline void vlist_update(struct vlist_tree *tree) { tree->version++;