From b7373855bf9e32447b24a05e1358272e2a4fc0e4 Mon Sep 17 00:00:00 2001 From: Niall O'Higgins Date: Sat, 11 Mar 2006 18:40:15 +0000 Subject: - set RCS_SYNCED on rcs_open() so that if you call rcs_close() immediately it will not write out a blank RCS file if there is no data in the backing structure. ok joris@ --- usr.bin/cvs/rcs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index bc5ed2d911a..0c61aad358e 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.141 2006/03/10 05:57:39 ray Exp $ */ +/* $OpenBSD: rcs.c,v 1.142 2006/03/11 18:40:14 niallo Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -305,7 +305,7 @@ rcs_open(const char *path, int flags, ...) memset(rfp, 0, sizeof(*rfp)); rfp->rf_path = xstrdup(path); - rfp->rf_flags = flags | RCS_SLOCK; + rfp->rf_flags = flags | RCS_SLOCK | RCS_SYNCED; rfp->rf_mode = fmode; TAILQ_INIT(&(rfp->rf_delta)); -- cgit v1.2.3