Wouldn't return (member->next && member->prev); be simpler?
> + */
> +#define list_for_each_entry_safe(pos, n, head, member) \
> + for (pos = list_entry((head)->next, typeof(*pos), member), \
> + n = list_entry(pos->member.next, typeof(*pos), member); \
> + &pos->member != (head); \
> + pos = n, \
> + n = list_entry(pos->member.next, typeof(*pos), member))
>
Identation looks a little strange..
-
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/