summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2006-05-28 18:33:50 +0000
committerRay Lai <ray@cvs.openbsd.org>2006-05-28 18:33:50 +0000
commit924ab032e9769bef6ec3feed07469a743410edec (patch)
tree48c9e35a7f8b8f3dd830e8ec4e956d0b14ca2d44 /usr.bin
parent3d80543fea00c028088d779f82fb47fa130c7357 (diff)
Don't fill in the rd_locker if we are creating a new RCS file.
OK joris@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/rcs/rcs.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/usr.bin/rcs/rcs.c b/usr.bin/rcs/rcs.c
index 98c73aaac18..a006abdef30 100644
--- a/usr.bin/rcs/rcs.c
+++ b/usr.bin/rcs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.10 2006/05/27 08:12:29 ray Exp $ */
+/* $OpenBSD: rcs.c,v 1.11 2006/05/28 18:33:49 ray Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -269,17 +269,18 @@ rcs_open(const char *path, int fd, int flags, ...)
TAILQ_INIT(&(rfp->rf_symbols));
TAILQ_INIT(&(rfp->rf_locks));
- if (!(rfp->rf_flags & RCS_CREATE))
+ if (!(rfp->rf_flags & RCS_CREATE)) {
rcs_parse_init(rfp);
- /* fill in rd_locker */
- TAILQ_FOREACH(lkr, &(rfp->rf_locks), rl_list) {
- if ((rdp = rcs_findrev(rfp, lkr->rl_num)) == NULL) {
- rcs_close(rfp);
- return (NULL);
- }
+ /* fill in rd_locker */
+ TAILQ_FOREACH(lkr, &(rfp->rf_locks), rl_list) {
+ if ((rdp = rcs_findrev(rfp, lkr->rl_num)) == NULL) {
+ rcs_close(rfp);
+ return (NULL);
+ }
- rdp->rd_locker = xstrdup(lkr->rl_name);
+ rdp->rd_locker = xstrdup(lkr->rl_name);
+ }
}
return (rfp);