diff --git a/builtin-prune-packed.c b/builtin-prune-packed.c index 6473d327e6..977730064b 100644 --- a/builtin-prune-packed.c +++ b/builtin-prune-packed.c @@ -25,10 +25,8 @@ static void prune_dir(int i, DIR *dir, char *pathname, int len, int opts) memcpy(pathname + len, de->d_name, 38); if (opts & DRY_RUN) printf("rm -f %s\n", pathname); - else { - if (unlink(pathname) < 0) - error("unable to unlink %s", pathname); - } + else if (unlink(pathname) < 0) + error("unable to unlink %s", pathname); } pathname[len] = 0; rmdir(pathname);