diff options
author | Xavier Santolaria <xsa@cvs.openbsd.org> | 2005-12-02 14:29:14 +0000 |
---|---|---|
committer | Xavier Santolaria <xsa@cvs.openbsd.org> | 2005-12-02 14:29:14 +0000 |
commit | 85cfd842f66fcc21d100cf316997f4a2e9dc71cf (patch) | |
tree | 589f7e6c1f5f76ed27f8856f973cf8f5445bcfa5 /usr.bin | |
parent | d7da0638dbfb634fa6910e5201f4f62c6911d855 (diff) |
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
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/rcs/ci.c | 10 |
1 files changed, 5 insertions, 5 deletions
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 <niallo@openbsd.org> * 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); } |