summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/ln/ln.c2
-rw-r--r--bin/rm/rm.c2
-rw-r--r--bin/test/test.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/bin/ln/ln.c b/bin/ln/ln.c
index fc3afc1..e5fdeee 100644
--- a/bin/ln/ln.c
+++ b/bin/ln/ln.c
@@ -80,7 +80,7 @@ main(int argc, char *argv[])
* "link", for which the functionality provided is greatly
* simplified.
*/
- if ((p = rindex(argv[0], '/')) == NULL)
+ if ((p = strrchr(argv[0], '/')) == NULL)
p = argv[0];
else
++p;
diff --git a/bin/rm/rm.c b/bin/rm/rm.c
index 653833a..af362a9 100644
--- a/bin/rm/rm.c
+++ b/bin/rm/rm.c
@@ -90,7 +90,7 @@ main(int argc, char *argv[])
* "unlink", for which the functionality provided is greatly
* simplified.
*/
- if ((p = rindex(argv[0], '/')) == NULL)
+ if ((p = strrchr(argv[0], '/')) == NULL)
p = argv[0];
else
++p;
diff --git a/bin/test/test.c b/bin/test/test.c
index 1259e68..62c0309 100644
--- a/bin/test/test.c
+++ b/bin/test/test.c
@@ -194,7 +194,7 @@ main(int argc, char **argv)
int res;
char *p;
- if ((p = rindex(argv[0], '/')) == NULL)
+ if ((p = strrchr(argv[0], '/')) == NULL)
p = argv[0];
else
p++;
OpenPOWER on IntegriCloud