summaryrefslogtreecommitdiffstats
path: root/libdm/datastruct
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2003-05-06 12:01:13 +0000
committerAlasdair Kergon <agk@redhat.com>2003-05-06 12:01:13 +0000
commit9a5e05a40698f7143002584aa635a07648c3c097 (patch)
treeb48f9640e0629c1339de07e843f56c65c63c86ba /libdm/datastruct
parent9019ed2e77b053f69b7d0382e0128550b2d58ec3 (diff)
downloadlvm2-9a5e05a40698f7143002584aa635a07648c3c097.tar.gz
lvm2-9a5e05a40698f7143002584aa635a07648c3c097.tar.xz
lvm2-9a5e05a40698f7143002584aa635a07648c3c097.zip
list_next
Diffstat (limited to 'libdm/datastruct')
-rw-r--r--libdm/datastruct/list.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libdm/datastruct/list.h b/libdm/datastruct/list.h
index 3084e88b..6041c1da 100644
--- a/libdm/datastruct/list.h
+++ b/libdm/datastruct/list.h
@@ -56,6 +56,11 @@ static inline int list_end(struct list *head, struct list *elem)
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) \
for (v = (head)->n; v != head; v = v->n)