summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/commit.c
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2005-07-14 06:50:51 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2005-07-14 06:50:51 +0000
commitafdc6e52f6ba396669fcf1d94f00df5035574531 (patch)
tree25a7dbf6795ecc527a311ad7629b7d779729cd62 /usr.bin/cvs/commit.c
parente6ebb5bb30a5ccf005b9cacf3f68a59c5ad53c1e (diff)
use cvs_rcs_getpath();
Diffstat (limited to 'usr.bin/cvs/commit.c')
-rw-r--r--usr.bin/cvs/commit.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c
index 5b82318a674..0659d7dede0 100644
--- a/usr.bin/cvs/commit.c
+++ b/usr.bin/cvs/commit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: commit.c,v 1.39 2005/07/12 07:12:13 xsa Exp $ */
+/* $OpenBSD: commit.c,v 1.40 2005/07/14 06:50:50 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -261,10 +261,7 @@ cvs_commit_remote(CVSFILE *cf, void *arg)
static int
cvs_commit_local(CVSFILE *cf, void *arg)
{
- int len;
char fpath[MAXPATHLEN], rcspath[MAXPATHLEN];
- char *repo;
- struct cvsroot *root;
if (cf->cf_type == DT_DIR) {
if (verbosity > 1)
@@ -272,18 +269,10 @@ cvs_commit_local(CVSFILE *cf, void *arg)
return (0);
}
- root = CVS_DIR_ROOT(cf);
- repo = CVS_DIR_REPO(cf);
-
cvs_file_getpath(cf, fpath, sizeof(fpath));
- len = snprintf(rcspath, sizeof(rcspath), "%s/%s/%s%s",
- root->cr_dir, repo, fpath, RCS_FILE_EXT);
- if (len == -1 || len >= (int)sizeof(rcspath)) {
- errno = ENAMETOOLONG;
- cvs_log(LP_ERRNO, "%s", rcspath);
+ if (cvs_rcs_getpath(cf, rcspath, sizeof(rcspath)) == NULL)
return (CVS_EX_DATA);
- }
return (0);
}