summaryrefslogtreecommitdiff
path: root/src/cp.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1994-12-10 05:41:52 +0000
committerJim Meyering <jim@meyering.net>1994-12-10 05:41:52 +0000
commit36a504f60530d1464dd03e12b8a37bd520b6e0aa (patch)
tree37641c9c9141ec094ec956d4001fdc7828aceb65 /src/cp.c
parentc95989d1484e91b263f94ff64f01246cb4177633 (diff)
downloadcoreutils-36a504f60530d1464dd03e12b8a37bd520b6e0aa.tar.xz
(copy, make_path_private): Use strr?chr instead of r?index.
Diffstat (limited to 'src/cp.c')
-rw-r--r--src/cp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cp.c b/src/cp.c
index a1962f722..462ead205 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -690,8 +690,8 @@ copy (src_path, dst_path, new_dst, device, ancestors)
else if (flag_symbolic_link)
{
if (*src_path == '/'
- || (!strncmp (dst_path, "./", 2) && index (dst_path + 2, '/') == 0)
- || index (dst_path, '/') == 0)
+ || (!strncmp (dst_path, "./", 2) && strchr (dst_path + 2, '/') == 0)
+ || strchr (dst_path, '/') == 0)
{
if (symlink (src_path, dst_path))
{
@@ -895,7 +895,7 @@ make_path_private (const_dirpath, src_offset, mode, verbose_fmt_string,
slash = src;
while (*slash == '/')
slash++;
- while ((slash = index (slash, '/')))
+ while ((slash = strchr (slash, '/')))
{
/* Add this directory to the list of directories whose modes need
fixing later. */