From: Andrew Morton <akpm@linux-foundation.org>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] string: implement streq()
Date: Mon, 3 Apr 2023 14:16:41 -0700 [thread overview]
Message-ID: <20230403141641.6ace0d85fd48fbed5c02d7ef@linux-foundation.org> (raw)
In-Reply-To: <4b595ab9-238c-43a5-aba0-be5d6afc0f87@p183>
On Sat, 1 Apr 2023 20:48:05 +0300 Alexey Dobriyan <adobriyan@gmail.com> wrote:
> Most of the time strcmp() is being used, strings are checked for equality.
> Add wrapper to relay such intent (it is shorter to type, too).
>
> Use
> if (streq(s, "s")) {
> }
> or
> if (!streq(s, "s")) {
> }
Gee, do we really want this? I mean, we all know how strcmp() works,
don't we?
I'm thinking it would be better to remove the various cute little
streq() macros and open-code strcmp(...)==0.
next prev parent reply other threads:[~2023-04-03 21:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-01 17:48 Alexey Dobriyan
2023-04-03 21:16 ` Andrew Morton [this message]
2023-04-04 14:54 ` Alexey Dobriyan
2023-04-05 10:45 ` David Laight
2023-04-05 11:39 ` Alexey Dobriyan
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=20230403141641.6ace0d85fd48fbed5c02d7ef@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=adobriyan@gmail.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®