summaryrefslogtreecommitdiff
path: root/hurd
diff options
context:
space:
mode:
authorWilco Dijkstra <wdijkstr@arm.com>2017-02-06 18:14:16 +0000
committerWilco Dijkstra <wdijkstr@arm.com>2017-02-06 18:15:18 +0000
commitc7a37ad352c90d798d138b9f83e0333c78d08410 (patch)
treee6946eed9f90ca89dd2660a8f1360961cffc9eb5 /hurd
parent5a68e857bf1b64c2576bbf32429aed5162e90bb9 (diff)
downloadglibc-c7a37ad352c90d798d138b9f83e0333c78d08410.tar.gz
As a minor cleanup remove the (r)index defines from include/string.h as
they are only used internally in a few places. Rename all uses that occur in GLIBC. * hurd/path-lookup.c (file_name_path_scan): Rename index to strchr. * include/string.h (index): Remove define. (rindex): Likewise. * misc/getttyent.c (__getttyent): Rename index to strchr. * misc/ttyslot.c (ttyslot): Rename rindex to strrchr. * sunrpc/rpc_main.c (mkfile_output): Likewise.
Diffstat (limited to 'hurd')
-rw-r--r--hurd/path-lookup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hurd/path-lookup.c b/hurd/path-lookup.c
index d79a482e83..f2061b0bff 100644
--- a/hurd/path-lookup.c
+++ b/hurd/path-lookup.c
@@ -33,7 +33,7 @@ file_name_path_scan (const char *file_name, const char *path,
error_t (*fun)(const char *name),
char **prefixed_name)
{
- if (path == NULL || index (file_name, '/'))
+ if (path == NULL || strchr (file_name, '/'))
{
if (prefixed_name)
*prefixed_name = 0;
@@ -47,7 +47,7 @@ file_name_path_scan (const char *file_name, const char *path,
for (;;)
{
error_t err;
- const char *next = index (path, ':') ?: path + strlen (path);
+ const char *next = strchr (path, ':') ?: path + strlen (path);
size_t pfx_len = next - path;
char pfxed_name[pfx_len + 2 + file_name_len + 1];