From: Eric Biggers Date: Mon, 31 Mar 2014 04:03:25 +0000 (-0500) Subject: dentry.c: A couple small optimizations X-Git-Tag: v1.6.2~2 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=60358c75e65f428a2da957cace0bc7a980e17fa2 dentry.c: A couple small optimizations --- diff --git a/src/dentry.c b/src/dentry.c index d425b280..ff4df8be 100644 --- a/src/dentry.c +++ b/src/dentry.c @@ -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;