From: Kevin O'Connor Date: Fri, 14 Jun 2013 00:44:09 +0000 (-0400) Subject: Fix error in hlist_for_each_entry_safe macro. X-Git-Tag: rel-1.7.3~5 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=9539e41c4d8701c19434457288c38109da163ffc;p=seabios.git Fix error in hlist_for_each_entry_safe macro. Fix broken macro - it did not work correctly at all. Signed-off-by: Kevin O'Connor --- diff --git a/src/list.h b/src/list.h index db7e962..0f0909b 100644 --- a/src/list.h +++ b/src/list.h @@ -68,8 +68,7 @@ hlist_add_after(struct hlist_node *n, struct hlist_node *prev) #define hlist_for_each_entry_safe(pos, pprev, head, member) \ for (pprev = &(head)->first \ - ; *pprev \ - && ({ pos=container_of((*pprev)->next, typeof(*pos), member); 1; }) \ + ; *pprev && ({ pos=container_of(*pprev, typeof(*pos), member); 1; }) \ ; pprev = &(*pprev)->next)