summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2006-11-14 15:23:51 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2006-11-14 15:23:51 +0000
commit735ff64164a35c86efb3b29ad72ba796e78f36a7 (patch)
tree7894a6de48e09446e321ae55497125a5aa30c4fd /usr.bin
parent70130744e786be53f66347820c3db21c55728c04 (diff)
Simplify in cvs_read_rcfile() by using cvs_path_cat();
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/cvs.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/usr.bin/cvs/cvs.c b/usr.bin/cvs/cvs.c
index a3dc2fbc346..b02d1e69e91 100644
--- a/usr.bin/cvs/cvs.c
+++ b/usr.bin/cvs/cvs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cvs.c,v 1.107 2006/07/09 01:57:51 joris Exp $ */
+/* $OpenBSD: cvs.c,v 1.108 2006/11/14 15:23:50 xsa Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
@@ -396,11 +396,9 @@ cvs_read_rcfile(void)
struct cvs_cmd *cmdp;
FILE *fp;
- if (strlcpy(rcpath, cvs_homedir, sizeof(rcpath)) >= sizeof(rcpath) ||
- strlcat(rcpath, "/", sizeof(rcpath)) >= sizeof(rcpath) ||
- strlcat(rcpath, CVS_PATH_RC, sizeof(rcpath)) >= sizeof(rcpath)) {
- errno = ENAMETOOLONG;
- cvs_log(LP_ERR, "%s", rcpath);
+ if (cvs_path_cat(cvs_homedir, CVS_PATH_RC, rcpath, sizeof(rcpath))
+ >= sizeof(rcpath)) {
+ cvs_log(LP_ERRNO, "%s", rcpath);
return;
}