* commit '17c3a227505988b33e1219a8e0a921de874f9b70': Fix list_for_each_safe macro
This commit is contained in:
commit
2113474ae0
1 changed files with 3 additions and 3 deletions
|
|
@ -44,10 +44,10 @@ struct listnode
|
|||
#define list_for_each_reverse(node, list) \
|
||||
for (node = (list)->prev; node != (list); node = node->prev)
|
||||
|
||||
#define list_for_each_safe(node, next, list) \
|
||||
for (node = (list)->next, next = node->next; \
|
||||
#define list_for_each_safe(node, n, list) \
|
||||
for (node = (list)->next, n = node->next; \
|
||||
node != (list); \
|
||||
node = next, next = node->next)
|
||||
node = n, n = node->next)
|
||||
|
||||
static inline void list_init(struct listnode *node)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue