summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxsa <xsa@openbsd.org>2006-02-13 11:02:58 +0000
committerxsa <xsa@openbsd.org>2006-02-13 11:02:58 +0000
commitdedf3eaab2f0d912aebf80db2e3d02776c05f395 (patch)
tree886410024f83f597c1d33f4d3fbc1cb0a7a25683
parentturn this into an example ssh_known_hosts file; ok djm (diff)
downloadwireguard-openbsd-dedf3eaab2f0d912aebf80db2e3d02776c05f395.tar.xz
wireguard-openbsd-dedf3eaab2f0d912aebf80db2e3d02776c05f395.zip
write out an empty comment in RCS files even if there isn't one as
gnu/usr.bin/cvs does. Found by niallo@'s automatic tool.
-rw-r--r--usr.bin/cvs/rcs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c
index 5bfd1ae296e..92150101322 100644
--- a/usr.bin/cvs/rcs.c
+++ b/usr.bin/cvs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.128 2006/02/09 08:08:56 niallo Exp $ */
+/* $OpenBSD: rcs.c,v 1.129 2006/02/13 11:02:58 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -475,12 +475,13 @@ rcs_write(RCSFILE *rfp)
fprintf(fp, " strict;");
fputc('\n', fp);
+ fputs("comment\t@", fp);
if (rfp->rf_comment != NULL) {
- fputs("comment\t@", fp);
rcs_strprint((const u_char *)rfp->rf_comment,
strlen(rfp->rf_comment), fp);
fputs("@;\n", fp);
- }
+ } else
+ fputs("# @;\n", fp);
if (rfp->rf_expand != NULL) {
fputs("expand @", fp);