summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxsa <xsa@openbsd.org>2005-12-02 14:29:13 +0000
committerxsa <xsa@openbsd.org>2005-12-02 14:29:13 +0000
commit420b7d9726151019e8bcea78d9ea9ee7bd3c723b (patch)
treec8d9080484bbccca59845b35dfec14ae57caf9a6
parentbetter.. (diff)
downloadwireguard-openbsd-420b7d9726151019e8bcea78d9ea9ee7bd3c723b.tar.xz
wireguard-openbsd-420b7d9726151019e8bcea78d9ea9ee7bd3c723b.zip
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
-rw-r--r--usr.bin/rcs/ci.c10
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);
}