From 90f3e2e3be10acf822c27b62de5edcdcd52db128 Mon Sep 17 00:00:00 2001 From: Jean-Francois Brousseau Date: Tue, 1 Mar 2005 21:14:22 +0000 Subject: fix call to rcs_open() so the file gets created, and remove the explicit call to rcs_write(), it is not needed anymore --- usr.bin/cvs/init.c | 9 ++------- 1 file 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 * 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); } } -- cgit v1.2.3