diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-01-09 04:12:35 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-01-09 09:40:59 -0500 |
commit | a9fd212a2416406f8503efe9e449718d0becfcb2 (patch) | |
tree | d3d593ed4b1579aab5cce2d297b40b8505ae60be /sim/testsuite | |
parent | 7eb99e5e27eebaf4a4acd469ad0856c0b35d80b3 (diff) | |
download | fsf-binutils-gdb-a9fd212a2416406f8503efe9e449718d0becfcb2.zip fsf-binutils-gdb-a9fd212a2416406f8503efe9e449718d0becfcb2.tar.gz fsf-binutils-gdb-a9fd212a2416406f8503efe9e449718d0becfcb2.tar.bz2 |
sim: replace rindex with strrchr
Diffstat (limited to 'sim/testsuite')
-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; |