diff options
author | 1998-03-12 06:57:16 +0000 | |
---|---|---|
committer | 1998-03-12 06:57:16 +0000 | |
commit | 5e617892100bd75f195dd997a7ce0514322cf7e8 (patch) | |
tree | 14404dcd83af4181e84b4aff1fe23c0d4057c303 /gnu/usr.bin/cvs/src/diff.c | |
parent | Correct morse options (diff) | |
download | wireguard-openbsd-5e617892100bd75f195dd997a7ce0514322cf7e8.tar.xz wireguard-openbsd-5e617892100bd75f195dd997a7ce0514322cf7e8.zip |
Latest version from Cyclic
Diffstat (limited to 'gnu/usr.bin/cvs/src/diff.c')
-rw-r--r-- | gnu/usr.bin/cvs/src/diff.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/gnu/usr.bin/cvs/src/diff.c b/gnu/usr.bin/cvs/src/diff.c index a894c5b4eb6..7a4c105b9d3 100644 --- a/gnu/usr.bin/cvs/src/diff.c +++ b/gnu/usr.bin/cvs/src/diff.c @@ -636,13 +636,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); } @@ -657,13 +655,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); } @@ -719,7 +715,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); } |