diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2006-03-30 23:12:53 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2006-03-30 23:12:53 +0000 |
commit | c088de16bb60fa31238c0b019977e7fbf41fdd16 (patch) | |
tree | 1c5516a171c0589f138f67108e0eaa221cc2c6e5 /usr.bin/cvs/rcs.c | |
parent | daef0f7ace6784734c3dabdcb5ce28d1d576a279 (diff) |
hmm, let's not use fatal() when we cannot find a branch instead return NULL
so the caller can identify the branch is not there and take correct action.
Diffstat (limited to 'usr.bin/cvs/rcs.c')
-rw-r--r-- | usr.bin/cvs/rcs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index bd639b1ff72..c89fc1a076b 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.157 2006/03/30 23:09:01 joris Exp $ */ +/* $OpenBSD: rcs.c,v 1.158 2006/03/30 23:12:52 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -1226,7 +1226,7 @@ rcs_getrev(RCSFILE *rfp, RCSNUM *frev) brev = rev; rdp = rcs_findrev(rfp, rev); if (rdp == NULL) - fatal("failed to translate branch to latest revision"); + return (NULL); rev = rdp->rd_num; } else { @@ -1445,7 +1445,7 @@ rcs_findrev(RCSFILE *rfp, RCSNUM *rev) for (;;) { rdp = rcs_findrev(rfp, frev); if (rdp == NULL) - fatal("failed to translate branch to last revision"); + return (NULL); if (rdp->rd_next->rn_len == 0) break; |