diff options
author | 2006-11-14 15:23:50 +0000 | |
---|---|---|
committer | 2006-11-14 15:23:50 +0000 | |
commit | 9fe3180ad8a597349bb5a7f2c8af4b3671d4d1c3 (patch) | |
tree | 8ab29b628a8f1cecc17d7d37328b27ba34c70f4e | |
parent | Handle global -l, -Q, and -r on the server side too. (diff) | |
download | wireguard-openbsd-9fe3180ad8a597349bb5a7f2c8af4b3671d4d1c3.tar.xz wireguard-openbsd-9fe3180ad8a597349bb5a7f2c8af4b3671d4d1c3.zip |
Simplify in cvs_read_rcfile() by using cvs_path_cat();
-rw-r--r-- | usr.bin/cvs/cvs.c | 10 |
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; } |