From: Simon Marchi <simon.marchi@efficios.com>
To: Andrew Burgess <aburgess@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb, gdbserver, gdbsupport: replace many uses of strcmp with streq
Date: Mon, 16 Mar 2026 13:29:38 -0400 [thread overview]
Message-ID: <3f37c7de-b6e0-44e2-bd5e-55e1166f438b@efficios.com> (raw)
In-Reply-To: <87h5qf7kwk.fsf@redhat.com>
On 3/16/26 1:18 PM, Andrew Burgess wrote:
> Simon Marchi <simon.marchi@efficios.com> writes:
>
>> Replace all occurrences of:
>>
>> strcmp (...) == 0
>> strcmp (...) != 0
>> !strcmp (...)
>> 0 == strcmp (...)
>> strcmp (...) directly used as a boolean predicate
>>
>> with the equivalent expression using streq.
>>
>> This is for consistency (we already use streq as some places in the
>> testsuite) but also for clarity. I think that streq is clearer on the
>> intent than strcmp. It's also a bit shorter.
>
> I haven't looked through every line of this patch, life's too short :)
> But I took a random sampling and it all looked good. I agree with the
> intent here, so:
Thanks for checking. The change was very mechanical. I also had it
reviewed by my buddy Claude Code, which would be good at spotting some
silly mistake that would reverse the logic of a condition.
> Approved-By: Andrew Burgess <aburgess@redhat.com>
Thanks, pushed.
Simon
prev parent reply other threads:[~2026-03-16 17:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 15:23 Simon Marchi
2026-03-16 17:18 ` Andrew Burgess
2026-03-16 17:29 ` Simon Marchi [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=3f37c7de-b6e0-44e2-bd5e-55e1166f438b@efficios.com \
--to=simon.marchi@efficios.com \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
/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