diff options
-rw-r--r-- | sim/testsuite/sim/cris/ChangeLog | 4 | ||||
-rw-r--r-- | sim/testsuite/sim/cris/c/readlink4.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sim/testsuite/sim/cris/ChangeLog b/sim/testsuite/sim/cris/ChangeLog index e9444bd1..9cfffd1 100644 --- a/sim/testsuite/sim/cris/ChangeLog +++ b/sim/testsuite/sim/cris/ChangeLog @@ -1,3 +1,7 @@ +2021-01-09 Mike Frysinger <vapier@gentoo.org> + + * readlink4.c (main): Change rindex to strrchr. + 2021-01-07 Mike Frysinger <vapier@gentoo.org> PR ld/13900 diff --git a/sim/testsuite/sim/cris/c/readlink4.c b/sim/testsuite/sim/cris/c/readlink4.c index 07a01e6..028f3ee 100644 --- a/sim/testsuite/sim/cris/c/readlink4.c +++ b/sim/testsuite/sim/cris/c/readlink4.c @@ -39,10 +39,10 @@ int main (int argc, char *argv[]) strcat (buf, argv[0]); - if (rindex (buf, '/') == NULL) + if (strrchr (buf, '/') == NULL) strcat (buf, "./"); - for (i = rindex (buf, '/') - buf + 1; i < max; i++) + for (i = strrchr (buf, '/') - buf + 1; i < max; i++) buf[i] = 'a'; buf [i] = 0; |