summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/init.c
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2007-02-17 18:23:44 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2007-02-17 18:23:44 +0000
commit9384a10810c060382177f59d1025e145cd63e903 (patch)
tree630c82f79a631a855e6a3959d5ae96e602671c9a /usr.bin/cvs/init.c
parent574a3af15cc4802db79e1bab0f6fb86a1be67e35 (diff)
cvs_path_cat() removal since we can now easily handle that
functionality w/ xsnprintf(); Initial diff started by thib@. OK thib@ joris@.
Diffstat (limited to 'usr.bin/cvs/init.c')
-rw-r--r--usr.bin/cvs/init.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/cvs/init.c b/usr.bin/cvs/init.c
index 30875e6b1f6..97983700aca 100644
--- a/usr.bin/cvs/init.c
+++ b/usr.bin/cvs/init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init.c,v 1.30 2007/02/06 17:34:06 xsa Exp $ */
+/* $OpenBSD: init.c,v 1.31 2007/02/17 18:23:43 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org>
@@ -103,17 +103,15 @@ cvs_init_local(void)
init_mkdir(current_cvsroot->cr_dir, 0777);
for (i = 0; i < INIT_NDIRS; i++) {
- if (cvs_path_cat(current_cvsroot->cr_dir,
- cvsroot_dirs[i], path, MAXPATHLEN) >= MAXPATHLEN)
- fatal("cvs_init_local: truncation");
+ (void)xsnprintf(path, MAXPATHLEN, "%s/%s",
+ current_cvsroot->cr_dir, cvsroot_dirs[i]);
init_mkdir(path, 0777);
}
for (i = 0; i < INIT_NFILES; i++) {
- if (cvs_path_cat(current_cvsroot->cr_dir,
- cvsroot_files[i].cf_path, path, MAXPATHLEN) >= MAXPATHLEN)
- fatal("cvs_init_local: truncation");
+ (void)xsnprintf(path, MAXPATHLEN, "%s/%s",
+ current_cvsroot->cr_dir, cvsroot_files[i].cf_path);
init_mkfile(path, cvsroot_files[i].cf_content);
}