[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230403141641.6ace0d85fd48fbed5c02d7ef@linux-foundation.org>
Date: Mon, 3 Apr 2023 14:16:41 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Alexey Dobriyan <adobriyan@...il.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] string: implement streq()
On Sat, 1 Apr 2023 20:48:05 +0300 Alexey Dobriyan <adobriyan@...il.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.
Powered by blists - more mailing lists