diff options
author | 2006-01-27 15:26:38 +0000 | |
---|---|---|
committer | 2006-01-27 15:26:38 +0000 | |
commit | 3956f8dacdf6781dcdb8afb283713ec9b5d75191 (patch) | |
tree | 3481bb89fd868309403fb6dab98f15f789deaf71 /usr.bin/cvs/diff.c | |
parent | Use letoh32 to print out configuration descriptors in debug functions. Now (diff) | |
download | wireguard-openbsd-3956f8dacdf6781dcdb8afb283713ec9b5d75191.tar.xz wireguard-openbsd-3956f8dacdf6781dcdb8afb283713ec9b5d75191.zip |
more errors handling cleanup;
Diffstat (limited to 'usr.bin/cvs/diff.c')
-rw-r--r-- | usr.bin/cvs/diff.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/usr.bin/cvs/diff.c b/usr.bin/cvs/diff.c index 1f26faffd80..3fce160672d 100644 --- a/usr.bin/cvs/diff.c +++ b/usr.bin/cvs/diff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diff.c,v 1.77 2006/01/25 11:13:18 xsa Exp $ */ +/* $OpenBSD: diff.c,v 1.78 2006/01/27 15:26:38 xsa Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. * All rights reserved. @@ -572,10 +572,9 @@ cvs_diff_local(CVSFILE *cf, void *arg) /* at this point, the file is modified */ cvs_rcs_getpath(cf, rcspath, sizeof(rcspath)); - rf = rcs_open(rcspath, RCS_READ); - if (rf == NULL) { - return (CVS_EX_DATA); - } + if ((rf = rcs_open(rcspath, RCS_READ)) == NULL) + fatal("cvs_diff_local: rcs_open `%s': %s", rcspath, + strerror(rcs_errno)); cvs_printf("Index: %s\n%s\nRCS file: %s\n", diff_file, RCS_DIFF_DIV, rcspath); @@ -583,10 +582,8 @@ cvs_diff_local(CVSFILE *cf, void *arg) if (dap->rev1 == NULL) r1 = cf->cf_lrev; else { - if ((r1 = rcsnum_parse(dap->rev1)) == NULL) { - rcs_close(rf); - return (CVS_EX_DATA); - } + if ((r1 = rcsnum_parse(dap->rev1)) == NULL) + fatal("cvs_diff_local: rcsnum_parse failed"); } cvs_printf("retrieving revision %s\n", |