From 9106dc25c1f58112521f4360e5e401ecc3624d6f Mon Sep 17 00:00:00 2001 From: Xavier Santolaria Date: Tue, 28 Mar 2006 12:48:52 +0000 Subject: check rcs_head_set() return value; OK niallo@. --- usr.bin/rcs/ci.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'usr.bin/rcs') 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 * 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; */ -- cgit v1.2.3