aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2013-06-13 20:44:09 -0400
committerKevin O'Connor <kevin@koconnor.net>2013-06-13 20:47:28 -0400
commit9539e41c4d8701c19434457288c38109da163ffc (patch)
tree90c36535e01057f841cebcc27fd5447107ec3bf8
parent59c21627c9d987d244a640dd451f860e1eacf764 (diff)
downloadseabios-hppa-9539e41c4d8701c19434457288c38109da163ffc.zip
seabios-hppa-9539e41c4d8701c19434457288c38109da163ffc.tar.gz
seabios-hppa-9539e41c4d8701c19434457288c38109da163ffc.tar.bz2
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 <kevin@koconnor.net>
-rw-r--r--src/list.h3
1 files changed, 1 insertions, 2 deletions
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)