From eb53586ba94087d9750c58d29ff494e5c1a95207 Mon Sep 17 00:00:00 2001 From: Alex Riesen Date: Fri, 26 Sep 2008 08:21:39 -0700 Subject: [PATCH] Cleanup remove_path Signed-off-by: Alex Riesen Signed-off-by: Shawn O. Pearce --- merge-recursive.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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, -- 2.30.2