On Fri, 5 July 2013 23:38:01 +0100, Filipe David Manana wrote:
>
> > +#define list_del_each_entry(pos, head, member) \
> > + while (list_empty(head) && (pos = list_first_entry((head), \
> > + typeof(*pos), member), list_del((head)->next), 1))
> > +
>
> Shouldn't it be while (!l
On Fri, Jul 5, 2013 at 9:41 PM, Jörn Engel wrote:
> I have seen a lot of boilerplate code that either follows the pattern of
> while (!list_empty(head)) {
> pos = list_entry(head->next, struct foo, list);
> list_del(pos->list);
> ...
>
I have seen a lot of boilerplate code that either follows the pattern of
while (!list_empty(head)) {
pos = list_entry(head->next, struct foo, list);
list_del(pos->list);
...
}
or some variant thereof.
With this patch in, people can us
3 matches
Mail list logo