From a0851ba9f4bb4e653ba8e97fb329a8e51428f000 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 24 Jun 2012 21:08:22 +0200 Subject: [PATCH] add blobmsg_list_for_each --- utils.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils.h b/utils.h index e89f2f1..7ee65a0 100644 --- a/utils.h +++ b/utils.h @@ -22,6 +22,9 @@ struct blobmsg_list_node { #define blobmsg_list_init(list, type, field) \ __blobmsg_list_init(list, offsetof(type, field), sizeof(type)) +#define blobmsg_list_for_each(list, element) \ + avl_for_each_element(&(list)->avl, element, avl) + void __blobmsg_list_init(struct blobmsg_list *list, int offset, int len); int blobmsg_list_fill(struct blobmsg_list *list, void *data, int len); void blobmsg_list_free(struct blobmsg_list *list); -- 2.25.1