summaryrefslogtreecommitdiff
path: root/bin/cp
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2015-11-16 21:35:59 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2015-11-16 21:35:59 +0000
commit20502435f32083981d6c610d20d6183fa98e76fe (patch)
tree92ebdb2222aea68b44c18de552c29727db52e392 /bin/cp
parent6e468c99ee9b960160e5b8fa19702106de6368bd (diff)
rename link to name to avoid shadowing the function
Diffstat (limited to 'bin/cp')
-rw-r--r--bin/cp/utils.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/cp/utils.c b/bin/cp/utils.c
index 056a1a7aa21..980244ae679 100644
--- a/bin/cp/utils.c
+++ b/bin/cp/utils.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utils.c,v 1.37 2015/05/03 19:44:58 guenther Exp $ */
+/* $OpenBSD: utils.c,v 1.38 2015/11/16 21:35:58 tedu Exp $ */
/* $NetBSD: utils.c,v 1.6 1997/02/26 14:40:51 cgd Exp $ */
/*-
@@ -202,19 +202,19 @@ int
copy_link(FTSENT *p, int exists)
{
int len;
- char link[PATH_MAX];
+ char name[PATH_MAX];
- if ((len = readlink(p->fts_path, link, sizeof(link)-1)) == -1) {
+ if ((len = readlink(p->fts_path, name, sizeof(name)-1)) == -1) {
warn("readlink: %s", p->fts_path);
return (1);
}
- link[len] = '\0';
+ name[len] = '\0';
if (exists && unlink(to.p_path)) {
warn("unlink: %s", to.p_path);
return (1);
}
- if (symlink(link, to.p_path)) {
- warn("symlink: %s", link);
+ if (symlink(name, to.p_path)) {
+ warn("symlink: %s", name);
return (1);
}
return (pflag ? setlink(p->fts_statp) : 0);