From 60358c75e65f428a2da957cace0bc7a980e17fa2 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sun, 30 Mar 2014 23:03:25 -0500 Subject: [PATCH 1/1] dentry.c: A couple small optimizations --- src/dentry.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; -- 2.43.0