dentry.c: A couple small optimizations
authorEric Biggers <ebiggers3@gmail.com>
Mon, 31 Mar 2014 04:03:25 +0000 (23:03 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Mon, 31 Mar 2014 04:03:25 +0000 (23:03 -0500)
src/dentry.c

index d425b28..ff4df8b 100644 (file)
@@ -313,7 +313,7 @@ do_for_dentry_in_tree(struct wim_dentry *dentry,
                return ret;
 
        for_dentry_child(child, dentry) {
-               ret = for_dentry_in_tree(child, visitor, arg);
+               ret = do_for_dentry_in_tree(child, visitor, arg);
                if (unlikely(ret))
                        return ret;
        }
@@ -329,7 +329,7 @@ do_for_dentry_in_tree_depth(struct wim_dentry *dentry,
        struct wim_dentry *child;
 
        for_dentry_child_postorder(child, dentry) {
-               ret = for_dentry_in_tree_depth(child, visitor, arg);
+               ret = do_for_dentry_in_tree_depth(child, visitor, arg);
                if (unlikely(ret))
                        return ret;
        }
@@ -1745,7 +1745,7 @@ write_dentry(const struct wim_dentry * restrict dentry, u8 * restrict p)
 static int
 write_dir_dentries(struct wim_dentry *dir, void *_pp)
 {
-       if (dentry_is_directory(dir)) {
+       if (dir->subdir_offset != 0) {
                u8 **pp = _pp;
                u8 *p = *pp;
                struct wim_dentry *child;