diff options
author | Jim Meyering <jim@meyering.net> | 1994-12-10 05:41:52 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1994-12-10 05:41:52 +0000 |
commit | 36a504f60530d1464dd03e12b8a37bd520b6e0aa (patch) | |
tree | 37641c9c9141ec094ec956d4001fdc7828aceb65 | |
parent | c95989d1484e91b263f94ff64f01246cb4177633 (diff) | |
download | coreutils-36a504f60530d1464dd03e12b8a37bd520b6e0aa.tar.xz |
(copy, make_path_private): Use strr?chr instead of r?index.
-rw-r--r-- | src/cp.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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. */ |