summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/src/diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/cvs/src/diff.c')
-rw-r--r--contrib/cvs/src/diff.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/contrib/cvs/src/diff.c b/contrib/cvs/src/diff.c
index 4690ed8..66d155e 100644
--- a/contrib/cvs/src/diff.c
+++ b/contrib/cvs/src/diff.c
@@ -638,13 +638,11 @@ RCS file: ", 0);
: vers->options),
tmp, (RCSCHECKOUTPROC) NULL,
(void *) NULL);
- if (retcode == -1)
+ if (retcode != 0)
{
- (void) CVS_UNLINK (tmp);
- error (1, errno, "fork failed during checkout of %s",
- vers->srcfile->path);
+ diff_mark_errors (err);
+ return err;
}
- /* FIXME: what if retcode > 0? */
status = diff_exec (DEVNULL, tmp, opts, RUN_TTY);
}
@@ -659,13 +657,11 @@ RCS file: ", 0);
*options ? options : vers->options,
tmp, (RCSCHECKOUTPROC) NULL,
(void *) NULL);
- if (retcode == -1)
+ if (retcode != 0)
{
- (void) CVS_UNLINK (tmp);
- error (1, errno, "fork failed during checkout of %s",
- vers->srcfile->path);
+ diff_mark_errors (err);
+ return err;
}
- /* FIXME: what if retcode > 0? */
status = diff_exec (tmp, DEVNULL, opts, RUN_TTY);
}
@@ -721,7 +717,8 @@ RCS file: ", 0);
if (empty_file == DIFF_REMOVED
|| (empty_file == DIFF_ADDED && use_rev2 != NULL))
{
- (void) CVS_UNLINK (tmp);
+ if (CVS_UNLINK (tmp) < 0)
+ error (0, errno, "cannot remove %s", tmp);
free (tmp);
}
OpenPOWER on IntegriCloud