Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 4 Oct 2002 11:12:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 4 Oct 2002 11:11:19 -0400 Received: from mg01.austin.ibm.com ([192.35.232.18]:21472 "EHLO mg01.austin.ibm.com") by vger.kernel.org with ESMTP id ; Fri, 4 Oct 2002 11:10:38 -0400 Content-Type: text/plain; charset=US-ASCII From: Kevin Corry Organization: IBM To: "Mark Peloquin" , Robert Varga Subject: Re: [PATCH] EVMS core 2/4: evms.h Date: Fri, 4 Oct 2002 09:43:16 -0500 X-Mailer: KMail [version 1.2] Cc: linux-kernel@vger.kernel.org References: <02100409034403.02266@boiler> In-Reply-To: <02100409034403.02266@boiler> MIME-Version: 1.0 Message-Id: <02100409431604.02266@boiler> Content-Transfer-Encoding: 7BIT Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1048 Lines: 33 On Friday 04 October 2002 09:03, Kevin Corry wrote: > On Friday 04 October 2002 08:59, Mark Peloquin wrote: > > On 10/04/2002 at 7:28 AM, Robert Varga wrote: > > > > > > > Possibly shortened to: > > > > > > static inline int list_member(struct list_head *member) > > > { > > > return member->next && member->prev; > > > } > > > > > > Faster, and (at least to me) it looks more obvious. > > > > Yes, this may be shorter. However with this change > > the return type would also need to be changed to > > portable across archs. > > What would the return type have to be? Hmm...seemed to be a misunderstanding. The "&&" operator causes the expression to evaluate to an int, and not to a list_head*. The above should work fine. -- Kevin Corry corryk@us.ibm.com http://evms.sourceforge.net/ - 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/