diff options
author | 2008-06-13 17:15:13 +0000 | |
---|---|---|
committer | 2008-06-13 17:15:13 +0000 | |
commit | a4a7c2fa3e32f430923b1e1c33a40b6ebb9d3b8d (patch) | |
tree | 441dd58a27b2969e9ec745d5e813354f88d09f78 | |
parent | Restore IDE_PCI_CLASS_OVERRIDE on SiI3512 SATA. (diff) | |
download | wireguard-openbsd-a4a7c2fa3e32f430923b1e1c33a40b6ebb9d3b8d.tar.xz wireguard-openbsd-a4a7c2fa3e32f430923b1e1c33a40b6ebb9d3b8d.zip |
pass the complete path to cvs_file_get_cf() instead of reconstructing
it again in that function.
-rw-r--r-- | usr.bin/cvs/admin.c | 4 | ||||
-rw-r--r-- | usr.bin/cvs/file.c | 13 | ||||
-rw-r--r-- | usr.bin/cvs/file.h | 5 |
3 files changed, 11 insertions, 11 deletions
diff --git a/usr.bin/cvs/admin.c b/usr.bin/cvs/admin.c index 92a29709248..15228fcce75 100644 --- a/usr.bin/cvs/admin.c +++ b/usr.bin/cvs/admin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: admin.c,v 1.60 2008/06/11 01:43:35 joris Exp $ */ +/* $OpenBSD: admin.c,v 1.61 2008/06/13 17:15:13 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2005 Joris Vink <joris@openbsd.org> @@ -254,7 +254,7 @@ cvs_admin_local(struct cvs_file *cf) strerror(errno)); /* XXX: S_ISREG() check instead of blindly using CVS_FILE? */ - ocf = cvs_file_get_cf(d, f, ofd, CVS_FILE, 0); + ocf = cvs_file_get_cf(d, f, oldfilename, ofd, CVS_FILE, 0); ocf->file_rcs = rcs_open(fpath, ofd, RCS_READ, 0444); if (ocf->file_rcs == NULL) diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c index d13aa54734c..2067db6d2bd 100644 --- a/usr.bin/cvs/file.c +++ b/usr.bin/cvs/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.245 2008/06/12 16:54:46 joris Exp $ */ +/* $OpenBSD: file.c,v 1.246 2008/06/13 17:15:13 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> @@ -218,15 +218,13 @@ cvs_file_get(const char *name, int user_supplied, struct cvs_flisthead *fl) } struct cvs_file * -cvs_file_get_cf(const char *d, const char *f, int fd, +cvs_file_get_cf(const char *d, const char *f, const char *fpath, int fd, int type, int user_supplied) { + const char *p; struct cvs_file *cf; - char *p, rpath[MAXPATHLEN]; - - (void)xsnprintf(rpath, MAXPATHLEN, "%s/%s", d, f); - for (p = rpath; p[0] == '.' && p[1] == '/';) + for (p = fpath; p[0] == '.' && p[1] == '/';) p += 2; cf = (struct cvs_file *)xcalloc(1, sizeof(*cf)); @@ -333,7 +331,8 @@ cvs_file_walklist(struct cvs_flisthead *fl, struct cvs_recursion *cr) } } - cf = cvs_file_get_cf(d, f, fd, type, l->user_supplied); + cf = cvs_file_get_cf(d, f, l->file_path, + fd, type, l->user_supplied); if (cf->file_type == CVS_DIR) { cvs_file_walkdir(cf, cr); } else { diff --git a/usr.bin/cvs/file.h b/usr.bin/cvs/file.h index 55d0a00f7c6..d1a4c29c5ce 100644 --- a/usr.bin/cvs/file.h +++ b/usr.bin/cvs/file.h @@ -1,4 +1,4 @@ -/* $OpenBSD: file.h,v 1.48 2008/03/09 01:54:03 joris Exp $ */ +/* $OpenBSD: file.h,v 1.49 2008/06/13 17:15:13 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> @@ -111,6 +111,7 @@ int cvs_file_cmpname(const char *, const char *); int cvs_file_cmp(const char *, const char *); int cvs_file_copy(const char *, const char *); -struct cvs_file *cvs_file_get_cf(const char *, const char *, int, int, int); +struct cvs_file *cvs_file_get_cf(const char *, const char *, const char *, + int, int, int); #endif /* FILE_H */ |