提交 bb150dc8 编写于 作者: J Juan Quintela 提交者: Anthony Liguori

Add LIST_FOREACH_SAFE() definition

Signed-off-by: NJuan Quintela <quintela@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 8718e999
......@@ -126,6 +126,11 @@ struct { \
(var); \
(var) = ((var)->field.le_next))
#define LIST_FOREACH_SAFE(var, head, field, next_var) \
for ((var) = ((head)->lh_first); \
(var) && ((next_var) = ((var)->field.le_next), 1); \
(var) = (next_var))
/*
* List access methods.
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册