X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=include%2Fwimlib%2Fdentry.h;h=5767ea1d14e7d0da3096fc28bf1714d44e10501e;hp=d0d1d0f5eced657a8787717c559532612063b73a;hb=d1bfffba93b1d841e243c923e739e0e39ee692f2;hpb=3b0fccf127a6f872841e68825a85470f7d88185c;ds=inline diff --git a/include/wimlib/dentry.h b/include/wimlib/dentry.h index d0d1d0f5..5767ea1d 100644 --- a/include/wimlib/dentry.h +++ b/include/wimlib/dentry.h @@ -159,12 +159,8 @@ for_dentry_in_tree_depth(struct wim_dentry *root, /* Iterate through each @child dentry of the @dir directory inode, * in sorted order (by case sensitive name). */ #define for_inode_child(child, dir) \ - for (struct avl_tree_node *_tmp = \ - avl_tree_first_in_order((dir)->i_children); \ - _tmp && \ - (((child) = avl_tree_entry(_tmp, struct wim_dentry, \ - d_index_node)), 1); \ - _tmp = avl_tree_next_in_order(_tmp)) + avl_tree_for_each_in_order((child), (dir)->i_children, \ + struct wim_dentry, d_index_node) /* Iterate through each @child dentry of the @parent dentry, * in sorted order (by case sensitive name). */ @@ -174,14 +170,8 @@ for_dentry_in_tree_depth(struct wim_dentry *root, /* Iterate through each @child dentry of the @dir directory inode, * in postorder (safe for freeing the child dentries). */ #define for_inode_child_postorder(child, dir) \ - for (struct avl_tree_node *_parent, *_tmp = \ - avl_tree_first_in_postorder( \ - (dir)->i_children); \ - _tmp && \ - (((child) = avl_tree_entry(_tmp, struct wim_dentry, \ - d_index_node)), 1) && \ - ((_parent = avl_get_parent(_tmp)), 1); \ - _tmp = avl_tree_next_in_postorder(_tmp, _parent)) + avl_tree_for_each_in_postorder((child), (dir)->i_children, \ + struct wim_dentry, d_index_node) /* Iterate through each @child dentry of the @parent dentry, * in postorder (safe for freeing the child dentries). */