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. --- sunrpc/rpc_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sunrpc') diff --git a/sunrpc/rpc_main.c b/sunrpc/rpc_main.c index 0a51e2c..f94bc91 100644 --- a/sunrpc/rpc_main.c +++ b/sunrpc/rpc_main.c @@ -956,7 +956,7 @@ mkfile_output (struct commandline *cmd) mkfilename = alloc (strlen ("Makefile.") + strlen (cmd->infile) + 1); if (mkfilename == NULL) abort (); - temp = rindex (cmd->infile, '.'); + temp = strrchr (cmd->infile, '.'); cp = stpcpy (mkfilename, "Makefile."); if (temp != NULL) *((char *) stpncpy (cp, cmd->infile, temp - cmd->infile)) = '\0'; -- cgit v1.1