lkml.org 
[lkml]   [2011]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] linux/string.h: Introduce streq macro.
From
On Wed, Apr 27, 2011 at 9:33 PM, H. Peter Anvin <hpa@zytor.com> wrote:
> Because !strcmp() is idiomatic C.
>
> This is the same kind of stupidity as
>
> #define BEGIN {
> #define END   }

No it's not.

It's the same kind of API extension kstrdup(), for example, is.
Whether or not we should it do it is a separate matter and I think the
only reasonable argument for and against is whether it (a) reduces the
number of bugs, (b) improves code readability significantly, or (c)
generates better code.

Pekka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-04-27 20:55    [W:0.276 / U:0.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site