summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Francois Brousseau <jfb@cvs.openbsd.org>2004-07-28 01:50:06 +0000
committerJean-Francois Brousseau <jfb@cvs.openbsd.org>2004-07-28 01:50:06 +0000
commitc8803f84e8cb8511982d364a9666d88163ff2ca3 (patch)
tree62fadea244831aafa4dedf6cf188eeb0fde1a81f
parent0d231e9dc86a73c191df1c313a1320a436f77aaf (diff)
Add a newline at the end of the strings put in CVS/Root and
CVS/Repository, like GNU CVS does
-rw-r--r--usr.bin/cvs/util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/cvs/util.c b/usr.bin/cvs/util.c
index 0ae827dad5c..aa738d002c4 100644
--- a/usr.bin/cvs/util.c
+++ b/usr.bin/cvs/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.2 2004/07/27 12:01:58 jfb Exp $ */
+/* $OpenBSD: util.c,v 1.3 2004/07/28 01:50:05 jfb Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -92,7 +92,6 @@ cvs_readrepo(const char *dir, char *dst, size_t len)
char repo_path[MAXPATHLEN];
snprintf(repo_path, sizeof(repo_path), "%s/CVS/Repository", dir);
-
fp = fopen(repo_path, "r");
if (fp == NULL) {
return (-1);
@@ -431,6 +430,7 @@ cvs_mkadmin(struct cvs_file *cdir, mode_t mode)
}
if (root->cr_dir)
fprintf(fp, "%s", root->cr_dir);
+ putc('\n', fp);
(void)fclose(fp);
if (cdir->cf_ddat->cd_repo != NULL) {
@@ -441,7 +441,7 @@ cvs_mkadmin(struct cvs_file *cdir, mode_t mode)
cvs_log(LP_ERRNO, "failed to open %s", path);
return (-1);
}
- fprintf(fp, "%s", cdir->cf_ddat->cd_repo);
+ fprintf(fp, "%s\n", cdir->cf_ddat->cd_repo);
(void)fclose(fp);
}