* commit '2113474ae090ee4c6a06864011ce8a4e4cae9673': Fix list_for_each_safe macro
This commit is contained in:
commit
2594f0f6d1
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…
Reference in a new issue