Messages in this thread | | | Date | Fri, 4 Oct 2002 14:28:17 +0200 | From | Robert Varga <> | Subject | Re: [Evms-devel] Re: [PATCH] EVMS core 2/4: evms.h |
| |
On Thu, Oct 03, 2002 at 12:42:23PM -0500, Mark Peloquin wrote: > >> +static inline int > >> +list_member(struct list_head *member) > >> +{ > >> + return ((!member->next || !member->prev) ? FALSE : TRUE); > >> +} > > > This should go into list.h > > Yes it should. I will pull this out of this header > and submit a patch for list.h.
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.
-- Kind regards, Robert Varga ------------------------------------------------------------------------------ n@hq.sk http://hq.sk/~nite/gpgkey.txt - 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/
| |