summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Francois Brousseau <jfb@cvs.openbsd.org>2005-03-01 21:14:22 +0000
committerJean-Francois Brousseau <jfb@cvs.openbsd.org>2005-03-01 21:14:22 +0000
commit90f3e2e3be10acf822c27b62de5edcdcd52db128 (patch)
tree06ab05637cb024e595388497d9cc663a05ec1903
parent5f390debec59935a3236b251b413b0a249b82c0c (diff)
fix call to rcs_open() so the file gets created, and remove the
explicit call to rcs_write(), it is not needed anymore
-rw-r--r--usr.bin/cvs/init.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/usr.bin/cvs/init.c b/usr.bin/cvs/init.c
index d843143c25d..a9b39868007 100644
--- a/usr.bin/cvs/init.c
+++ b/usr.bin/cvs/init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init.c,v 1.10 2005/02/27 00:22:08 jfb Exp $ */
+/* $OpenBSD: init.c,v 1.11 2005/03/01 21:14:21 jfb Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -128,16 +128,11 @@ cvs_init(int argc, char **argv)
(void)close(fd);
strlcat(path, RCS_FILE_EXT, sizeof(path));
- rfp = rcs_open(path, RCS_WRITE, 0644);
+ rfp = rcs_open(path, RCS_WRITE|RCS_CREATE, 0640);
if (rfp == NULL) {
return (EX_CANTCREAT);
}
- if (rcs_write(rfp) < 0) {
- rcs_close(rfp);
- return (EX_CANTCREAT);
- }
-
rcs_close(rfp);
}
}