add simple blobmsg list wrapper
authorFelix Fietkau <nbd@openwrt.org>
Sun, 10 Jun 2012 15:24:50 +0000 (17:24 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 10 Jun 2012 15:24:50 +0000 (17:24 +0200)
utils.h

diff --git a/utils.h b/utils.h
index 3aad3b1..ce9d9dd 100644 (file)
--- a/utils.h
+++ b/utils.h
@@ -16,6 +16,9 @@ struct blobmsg_list_node {
        struct blob_attr *data;
 };
 
        struct blob_attr *data;
 };
 
+#define blobmsg_list_simple_init(list) \
+       __blobmsg_list_init(tree, 0, sizeof(struct blobmsg_list_node))
+
 #define blobmsg_list_init(list, type, field) \
        __blobmsg_list_init(tree, offsetof(type, field), sizeof(type))
 
 #define blobmsg_list_init(list, type, field) \
        __blobmsg_list_init(tree, offsetof(type, field), sizeof(type))