From c7a37ad352c90d798d138b9f83e0333c78d08410 Mon Sep 17 00:00:00 2001 From: Wilco Dijkstra Date: Mon, 6 Feb 2017 18:14:16 +0000 Subject: 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. --- hurd/path-lookup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hurd') 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]; -- cgit v1.2.1