diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2013-06-13 21:24:14 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2013-06-13 21:24:14 -0400 |
commit | 030a58a05e595694dccfa958563103d2f0644231 (patch) | |
tree | 3cb4e135ded7235f2edbbfc12db8764bd47221e7 /src/pmm.c | |
parent | 7507ce28f436fe8b37bcd09a85c7289bf4c4284f (diff) | |
download | qemu-seabios-030a58a05e595694dccfa958563103d2f0644231.tar.gz |
Another fix for hlist_for_each_entry_safe.
Although the previous patch does fix hlist_for_each_entry_safe for the
common case, it doesn't work correctly when deleting the current
node. To fix this, introduce two macros - hlist_for_each_entry_safe
for iterating through a list that can be modified, and
hlist_for_each_entry_pprev for those users that only need access to
the "pprev" pointer.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/pmm.c')
-rw-r--r-- | src/pmm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -86,7 +86,7 @@ addSpace(struct zone_s *zone, void *start, void *end) // Find position to add space struct allocinfo_s *info; struct hlist_node **pprev; - hlist_for_each_entry_safe(info, pprev, &zone->head, node) { + hlist_for_each_entry_pprev(info, pprev, &zone->head, node) { if (info->data < start) break; } |