summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Alex Riesen <raa.lkml@gmail.com>2008-09-26 08:21:39 -0700
committerLibravatar Shawn O. Pearce <spearce@spearce.org>2008-09-26 08:24:19 -0700
commiteb53586ba94087d9750c58d29ff494e5c1a95207 (patch)
treefbee35a827cde50ddf13aa1add0df0a7386b0f94
parentMerge branch 'mv/merge-recursive' (diff)
downloadtgif-eb53586ba94087d9750c58d29ff494e5c1a95207.tar.xz
Cleanup remove_path
Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rw-r--r--merge-recursive.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index dbdb9ac2c4..ac90fd9e27 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,