]> wimlib.net Git - wimlib/blobdiff - src/update_image.c
Transition wimlib to AVL tree code
[wimlib] / src / update_image.c
index 5a5ae69066f590f119fed933296a410c545be2bc..7d2d531c506b079d6c4738430ea5a6e4006c2e8b 100644 (file)
@@ -42,8 +42,6 @@
 static int
 do_overlay(struct wim_dentry *target, struct wim_dentry *branch)
 {
-       struct rb_root *rb_root;
-
        DEBUG("Doing overlay \"%"WS"\" => \"%"WS"\"",
              branch->file_name, target->file_name);
 
@@ -53,10 +51,9 @@ do_overlay(struct wim_dentry *target, struct wim_dentry *branch)
                return WIMLIB_ERR_INVALID_OVERLAY;
        }
 
-       rb_root = &branch->d_inode->i_children;
        LIST_HEAD(moved_children);
-       while (rb_root->rb_node) { /* While @branch has children... */
-               struct wim_dentry *child = rbnode_dentry(rb_root->rb_node);
+       while (dentry_has_children(branch)) {
+               struct wim_dentry *child = dentry_any_child(branch);
                struct wim_dentry *existing;
 
                /* Move @child to the directory @target */