Makes prune_dir void and cleans up function calls. David Signed-off-by: David Rientjes <rientjes@xxxxxxxxxx> --- builtin-prune.c | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/builtin-prune.c b/builtin-prune.c index 89ec7f1..f01f275 100644 --- a/builtin-prune.c +++ b/builtin-prune.c @@ -14,24 +14,24 @@ static const char prune_usage[] = "git-p static int show_only = 0; static struct rev_info revs; -static int prune_object(char *path, const char *filename, const unsigned char *sha1) +static void prune_object(char *path, const char *filename, + const unsigned char *sha1) { if (show_only) { printf("would prune %s/%s\n", path, filename); - return 0; + } else { + unlink(mkpath("%s/%s", path, filename)); + rmdir(path); } - unlink(mkpath("%s/%s", path, filename)); - rmdir(path); - return 0; } -static int prune_dir(int i, char *path) +static void prune_dir(int i, char *path) { DIR *dir = opendir(path); struct dirent *de; if (!dir) - return 0; + return; while ((de = readdir(dir)) != NULL) { char name[100]; @@ -65,7 +65,6 @@ static int prune_dir(int i, char *path) fprintf(stderr, "bad sha1 file: %s/%s\n", path, de->d_name); } closedir(dir); - return 0; } static void prune_object_dir(const char *path) -- 1.4.2.g89bb-dirty - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html