diff options
| author | 2005-07-14 06:50:50 +0000 | |
|---|---|---|
| committer | 2005-07-14 06:50:50 +0000 | |
| commit | 3f748f9f98c67b89e7930ecf64413cee44fb1088 (patch) | |
| tree | 5b9ac34491e8f9704f7e46ff08e140a4f5c15bf1 /usr.bin/cvs/commit.c | |
| parent | More bge ids, found in Broadcom's Linux driver. ok brad@ (diff) | |
| download | wireguard-openbsd-3f748f9f98c67b89e7930ecf64413cee44fb1088.tar.xz wireguard-openbsd-3f748f9f98c67b89e7930ecf64413cee44fb1088.zip | |
use cvs_rcs_getpath();
Diffstat (limited to 'usr.bin/cvs/commit.c')
| -rw-r--r-- | usr.bin/cvs/commit.c | 15 |
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); } |
