mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
list_next
This commit is contained in:
parent
9019ed2e77
commit
9a5e05a406
@ -56,6 +56,11 @@ static inline int list_end(struct list *head, struct list *elem)
|
|||||||
return elem->n == head;
|
return elem->n == head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline struct list *list_next(struct list *head, struct list *elem)
|
||||||
|
{
|
||||||
|
return (list_end(head, elem) ? NULL : elem->n);
|
||||||
|
}
|
||||||
|
|
||||||
#define list_iterate(v, head) \
|
#define list_iterate(v, head) \
|
||||||
for (v = (head)->n; v != head; v = v->n)
|
for (v = (head)->n; v != head; v = v->n)
|
||||||
|
|
||||||
|
@ -56,6 +56,11 @@ static inline int list_end(struct list *head, struct list *elem)
|
|||||||
return elem->n == head;
|
return elem->n == head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline struct list *list_next(struct list *head, struct list *elem)
|
||||||
|
{
|
||||||
|
return (list_end(head, elem) ? NULL : elem->n);
|
||||||
|
}
|
||||||
|
|
||||||
#define list_iterate(v, head) \
|
#define list_iterate(v, head) \
|
||||||
for (v = (head)->n; v != head; v = v->n)
|
for (v = (head)->n; v != head; v = v->n)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user