Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759305Ab1D0Svv (ORCPT ); Wed, 27 Apr 2011 14:51:51 -0400 Received: from mail-yx0-f174.google.com ([209.85.213.174]:63544 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755189Ab1D0Svt convert rfc822-to-8bit (ORCPT ); Wed, 27 Apr 2011 14:51:49 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=Kbscz/zd+MViMz52Q7oEBSyb4O56ixe+jNBRw8X9XL/dTbro0kaKchiWTaza/yY8cg Uzho6JznmbpSUYnKQbJ3Y3SzflbdH5PYAImzsab+peycvIA4R1xAtkN/pRx0uPXEvHsl xC/54OI+8o1VDjql9h/AqqaqlTv/b10w+sVMY= MIME-Version: 1.0 In-Reply-To: <4DB86163.2070201@zytor.com> References: <1303926576.18763.75.camel@gandalf.stny.rr.com> <4DB86163.2070201@zytor.com> Date: Wed, 27 Apr 2011 21:51:48 +0300 X-Google-Sender-Auth: y4MIA238SE_449mNuRuhwAF-nE0 Message-ID: Subject: Re: [PATCH] linux/string.h: Introduce streq macro. From: Pekka Enberg To: "H. Peter Anvin" Cc: Steven Rostedt , Thiago Farina , linux-kernel@vger.kernel.org, Alexey Dobriyan , Rusty Russell , Ingo Molnar , "David S. Miller" , Al Viro , "Ted Ts'o" , Christoph Hellwig Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 775 Lines: 22 On Wed, Apr 27, 2011 at 9:33 PM, H. Peter Anvin 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/