From 85cfd842f66fcc21d100cf316997f4a2e9dc71cf Mon Sep 17 00:00:00 2001 From: Xavier Santolaria Date: Fri, 2 Dec 2005 14:29:14 +0000 Subject: in checkin_checklock() - make it work as expected (e.g. when no lock set at all too) - add missing word in error message - minor knf --- usr.bin/rcs/ci.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/rcs/ci.c b/usr.bin/rcs/ci.c index 42d1e7690ca..424da812a1d 100644 --- a/usr.bin/rcs/ci.c +++ b/usr.bin/rcs/ci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ci.c,v 1.78 2005/12/02 13:53:43 xsa Exp $ */ +/* $OpenBSD: ci.c,v 1.79 2005/12/02 14:29:13 xsa Exp $ */ /* * Copyright (c) 2005 Niall O'Higgins * All rights reserved. @@ -703,17 +703,17 @@ checkin_checklock(struct checkin_params *pb) if (!strcmp(lkp->rl_name, pb->username)) notlocked = 0; - if (!strcmp(lkp->rl_name, pb->username) && - !rcsnum_cmp(lkp->rl_num, pb->frev, 0)) { + if ((!strcmp(lkp->rl_name, pb->username)) && + (!rcsnum_cmp(lkp->rl_num, pb->frev, 0))) { found = 1; return (0); } } } - if ((found == 0) && (notlocked == 0)) { + if ((found == 0) && (notlocked == 1)) { cvs_log(LP_ERR, - "%s: no lock by %s", pb->file->rf_path, pb->username); + "%s: no lock set by %s", pb->file->rf_path, pb->username); rcs_close(pb->file); return (-1); } -- cgit v1.2.3