From: Andreas Schwab <schwab@suse.de>
To: Pedro Alves <palves@redhat.com>
Cc: Sergio Durigan Junior <sergiodj@redhat.com>,
Simon Marchi <simon.marchi@ericsson.com>,
gdb-patches@sourceware.org
Subject: Re: [PATCH] Introduce skip_to_char and use it
Date: Wed, 27 Jan 2016 11:53:00 -0000 [thread overview]
Message-ID: <mvm60yfi6ho.fsf@hawking.suse.de> (raw)
In-Reply-To: <56A8A855.8050208@redhat.com> (Pedro Alves's message of "Wed, 27 Jan 2016 11:21:57 +0000")
Pedro Alves <palves@redhat.com> writes:
> On 01/27/2016 01:32 AM, Sergio Durigan Junior wrote:
>
>> The problem with skip_to_char IMO is that it leads the reader to believe
>> that this function performs the same job as strchr (in fact, my first
>> reaction when I read this introduction was to think "why not use
>> strchr?"). The main difference, however, is that this function actually
>> skips everything if the char was not found.
>>
>> I believe a name like "skip_to_char_or_nul" may be more appropriate.
>> What do you think?
>
> That sounds just like strchrnul, though.
Or strcspn.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
next prev parent reply other threads:[~2016-01-27 11:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-26 21:54 Simon Marchi
2016-01-27 1:32 ` Sergio Durigan Junior
2016-01-27 11:22 ` Pedro Alves
2016-01-27 11:53 ` Andreas Schwab [this message]
2016-01-27 18:04 ` Sergio Durigan Junior
2016-01-27 18:27 ` Simon Marchi
2016-01-27 21:04 ` Simon Marchi
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=mvm60yfi6ho.fsf@hawking.suse.de \
--to=schwab@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=sergiodj@redhat.com \
--cc=simon.marchi@ericsson.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