public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: "Xiao Zeng" <zengxiao@eswincomputing.com>
To: "Jeff Johnston" <jjohnstn@redhat.com>
Cc: "newlib@sourceware.org" <newlib@sourceware.org>,
	 "palmer@rivosinc.com" <palmer@rivosinc.com>,
	 jeffreyalaw <jeffreyalaw@gmail.com>,
	 "Torbjorn SVENSSON" <torbjorn.svensson@foss.st.com>
Subject: Re: Re: [PING^1] [PATCH] newlib: libc: Improved the readability of strspn with minor optimization
Date: Wed, 3 Jan 2024 09:26:26 +0800	[thread overview]
Message-ID: <202401030926266661722@eswincomputing.com> (raw)
In-Reply-To: <CAOox84s3nZvvpM=h9LAMT6qMyGtZ-6xfA_DG49ewc__V5cojZg@mail.gmail.com>

2024-01-03 03:24  Jeff Johnston <jjohnstn@redhat.com> wrote:
>
 
>Hello,
>
>I modified the code to change the label to "found" instead of "end" since
>"end" is usually used to jump to the end of function as opposed to loop. 
Thank you Jeff, your modifications have made the code more meaningful.

>Modified code has been merged.
>
>-- Jeff J.
>
>On Tue, Jan 2, 2024 at 12:57 AM Xiao Zeng <zengxiao@eswincomputing.com>
>wrote:
>
>> Signed-off-by: Xiao Zeng <zengxiao@eswincomputing.com>
>> ---
>>  newlib/libc/string/strspn.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/newlib/libc/string/strspn.c b/newlib/libc/string/strspn.c
>> index baf239947..9d46ce2eb 100644
>> --- a/newlib/libc/string/strspn.c
>> +++ b/newlib/libc/string/strspn.c
>> @@ -41,10 +41,11 @@ strspn (const char *s1,
>>        for (c = s2; *c; c++)
>>         {
>>           if (*s1 == *c)
>> -           break;
>> +           goto end;
>>         }
>>        if (*c == '\0')
>>         break;
>> +end:
>>        s1++;
>>      }
>>
>> --
>> 2.17.1
>>
>>
 
Thanks
Xiao Zeng


      reply	other threads:[~2024-01-03  1:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-02  5:56 Xiao Zeng
2024-01-02 19:24 ` Jeff Johnston
2024-01-03  1:26   ` Xiao Zeng [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202401030926266661722@eswincomputing.com \
    --to=zengxiao@eswincomputing.com \
    --cc=jeffreyalaw@gmail.com \
    --cc=jjohnstn@redhat.com \
    --cc=newlib@sourceware.org \
    --cc=palmer@rivosinc.com \
    --cc=torbjorn.svensson@foss.st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).