summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/rcs.c
diff options
context:
space:
mode:
authorJean-Francois Brousseau <jfb@cvs.openbsd.org>2005-03-13 22:50:35 +0000
committerJean-Francois Brousseau <jfb@cvs.openbsd.org>2005-03-13 22:50:35 +0000
commit8f8cdbd74e14b9250369ce67311e79dc66aded6b (patch)
treeef79776b0af4d185d5079b27c8917ccfb44f66a4 /usr.bin/cvs/rcs.c
parent1bb479f2b1ffc27015c4db7049d5a2e2364c11e2 (diff)
set rcs_errno to RCS_ERR_NOENT if no matching symbol is found in
rcs_sym_getrev()
Diffstat (limited to 'usr.bin/cvs/rcs.c')
-rw-r--r--usr.bin/cvs/rcs.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c
index 6eb82bf888e..3310f71266f 100644
--- a/usr.bin/cvs/rcs.c
+++ b/usr.bin/cvs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.35 2005/03/13 22:07:49 jfb Exp $ */
+/* $OpenBSD: rcs.c,v 1.36 2005/03/13 22:50:34 jfb Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -634,14 +634,13 @@ rcs_sym_getrev(RCSFILE *file, const char *sym)
struct rcs_sym *symp;
num = NULL;
-
TAILQ_FOREACH(symp, &(file->rf_symbols), rs_list)
if (strcmp(symp->rs_name, sym) == 0)
break;
- if (symp == NULL) {
- /* XXX set error */
- } else if (((num = rcsnum_alloc()) != NULL) &&
+ if (symp == NULL)
+ rcs_errno = RCS_ERR_NOENT;
+ else if (((num = rcsnum_alloc()) != NULL) &&
(rcsnum_cpy(symp->rs_num, num, 0) < 0)) {
rcsnum_free(num);
num = NULL;