diff options
author | 2006-03-30 23:12:52 +0000 | |
---|---|---|
committer | 2006-03-30 23:12:52 +0000 | |
commit | 983f9025e156c367be3bd7198d5ef4baeec46bc9 (patch) | |
tree | 7ec99cf19696dc49fcdcf65afc033e80e546ffa0 | |
parent | zap unused variable, niallo@ noticed (diff) | |
download | wireguard-openbsd-983f9025e156c367be3bd7198d5ef4baeec46bc9.tar.xz wireguard-openbsd-983f9025e156c367be3bd7198d5ef4baeec46bc9.zip |
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.
-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; |