Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 4 Oct 2002 10:50:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 4 Oct 2002 10:50:21 -0400 Received: from e4.ny.us.ibm.com ([32.97.182.104]:7083 "EHLO e4.ny.us.ibm.com") by vger.kernel.org with ESMTP id ; Fri, 4 Oct 2002 10:44:30 -0400 Importance: Normal Sensitivity: Subject: Re: [PATCH] EVMS core 2/4: evms.h To: "Kevin M Corry" Cc: Robert Varga , linux-kernel@vger.kernel.org X-Mailer: Lotus Notes Release 5.0.7 March 21, 2001 Message-ID: From: "Mark Peloquin" Date: Fri, 4 Oct 2002 09:56:11 -0500 X-MIMETrack: Serialize by Router on D01ML072/01/M/IBM(Release 5.0.11 |July 29, 2002) at 10/04/2002 10:49:54 AM MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 902 Lines: 33 On 10/04/2002 at 9:03 AM, Kevin Corry 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? Ok, I was (incorrectly) thinking this would return a *list_head, but after waking up a bit more I see the "&&" which should return a int. So I agree Robert's improvement is fine! Mark - 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/