summaryrefslogtreecommitdiff
path: root/usr.bin/rcs
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2006-03-28 12:48:52 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2006-03-28 12:48:52 +0000
commit9106dc25c1f58112521f4360e5e401ecc3624d6f (patch)
treeb2c5c7d161d0db4b7147f66b616b94398fb6e31f /usr.bin/rcs
parent76e8b7893858f59eeb9ad3dc716d80f87b95fcdd (diff)
check rcs_head_set() return value; OK niallo@.
Diffstat (limited to 'usr.bin/rcs')
-rw-r--r--usr.bin/rcs/ci.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/usr.bin/rcs/ci.c b/usr.bin/rcs/ci.c
index 24d9d8e220f..30e39a9e42c 100644
--- a/usr.bin/rcs/ci.c
+++ b/usr.bin/rcs/ci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ci.c,v 1.130 2006/03/28 12:07:10 xsa Exp $ */
+/* $OpenBSD: ci.c,v 1.131 2006/03/28 12:48:51 xsa Exp $ */
/*
* Copyright (c) 2005, 2006 Niall O'Higgins <niallo@openbsd.org>
* All rights reserved.
@@ -568,9 +568,10 @@ checkin_update(struct checkin_params *pb)
* If we are checking in to a non-default (ie user-specified)
* revision, set head to this revision.
*/
- if (pb->newrev != NULL)
- rcs_head_set(pb->file, pb->newrev);
- else
+ if (pb->newrev != NULL) {
+ if (rcs_head_set(pb->file, pb->newrev) < 0)
+ fatal("rcs_head_set failed");
+ } else
pb->newrev = pb->file->rf_head;
/* New head revision has to contain entire file; */
@@ -704,9 +705,10 @@ checkin_init(struct checkin_params *pb)
* If we are checking in to a non-default (ie user-specified)
* revision, set head to this revision.
*/
- if (pb->newrev != NULL)
- rcs_head_set(pb->file, pb->newrev);
- else
+ if (pb->newrev != NULL) {
+ if (rcs_head_set(pb->file, pb->newrev) < 0)
+ fatal("rcs_head_set failed");
+ } else
pb->newrev = pb->file->rf_head;
/* New head revision has to contain entire file; */