From: Alex Riesen Date: Fri, 26 Sep 2008 15:21:39 +0000 (-0700) Subject: Cleanup remove_path X-Git-Tag: v1.6.1-rc1~201 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=eb53586ba94087d9750c58d29ff494e5c1a95207;p=git.git Cleanup remove_path Signed-off-by: Alex Riesen Signed-off-by: Shawn O. Pearce --- diff --git a/merge-recursive.c b/merge-recursive.c index dbdb9ac2c..ac90fd9e2 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -394,12 +394,10 @@ static int update_stages(const char *path, struct diff_filespec *o, static int remove_path(const char *name) { - int ret; char *slash, *dirs; - ret = unlink(name); - if (ret) - return ret; + if (unlink(name)) + return -1; dirs = xstrdup(name); while ((slash = strrchr(name, '/'))) { *slash = '\0'; @@ -407,7 +405,7 @@ static int remove_path(const char *name) break; } free(dirs); - return ret; + return 0; } static int remove_file(struct merge_options *o, int clean,