public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] sim: replace rindex with strrchr
@ 2021-01-09  9:15 Mike Frysinger
  2021-01-09 11:35 ` Andrew Burgess
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2021-01-09  9:15 UTC (permalink / raw)
  To: gdb-patches

---
 sim/testsuite/sim/cris/c/readlink4.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sim/testsuite/sim/cris/c/readlink4.c b/sim/testsuite/sim/cris/c/readlink4.c
index 07a01e66453e..028f3ee44ca6 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;
-- 
2.28.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] sim: replace rindex with strrchr
  2021-01-09  9:15 [PATCH] sim: replace rindex with strrchr Mike Frysinger
@ 2021-01-09 11:35 ` Andrew Burgess
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Burgess @ 2021-01-09 11:35 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: gdb-patches

LGTM, but will need a ChangeLog entry.  Ideally the ChangeLog entries
would be included in your patch email - just gives a chance for them
to be checked for missing entries / typos / etc.

Thanks,
Andrew


* Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org> [2021-01-09 04:15:13 -0500]:

> ---
>  sim/testsuite/sim/cris/c/readlink4.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sim/testsuite/sim/cris/c/readlink4.c b/sim/testsuite/sim/cris/c/readlink4.c
> index 07a01e66453e..028f3ee44ca6 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;
> -- 
> 2.28.0
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-09 11:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-09  9:15 [PATCH] sim: replace rindex with strrchr Mike Frysinger
2021-01-09 11:35 ` Andrew Burgess

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).