diff options
author | Niall O'Higgins <niallo@cvs.openbsd.org> | 2006-03-11 18:40:15 +0000 |
---|---|---|
committer | Niall O'Higgins <niallo@cvs.openbsd.org> | 2006-03-11 18:40:15 +0000 |
commit | b7373855bf9e32447b24a05e1358272e2a4fc0e4 (patch) | |
tree | c7e7567f4e3d3664ae75bd49acc5e8e96979601a | |
parent | ce47b51b27383b6e47666151d2b18039fd7953c9 (diff) |
- 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@
-rw-r--r-- | usr.bin/cvs/rcs.c | 4 |
1 files 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 <jfb@openbsd.org> * 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)); |