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/boot.c | |
parent | 7507ce28f436fe8b37bcd09a85c7289bf4c4284f (diff) | |
download | 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/boot.c')
-rw-r--r-- | src/boot.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -324,7 +324,7 @@ bootentry_add(int type, int prio, u32 data, const char *desc) // Add entry in sorted order. struct hlist_node **pprev; struct bootentry_s *pos; - hlist_for_each_entry_safe(pos, pprev, &BootList, node) { + hlist_for_each_entry_pprev(pos, pprev, &BootList, node) { if (be->priority < pos->priority) break; if (be->priority > pos->priority) |