lkml.org 
[lkml]   [2002]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] EVMS core 2/4: evms.h
From
Date

On 10/04/2002 at 9:03 AM, Kevin Corry wrote:
> > <snip...>
> >
> > > 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/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.017 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site