]> pilppa.org Git - uci.git/blobdiff - list.c
improved debugging
[uci.git] / list.c
diff --git a/list.c b/list.c
index 357b2e407efd3f49af1d5495841c6677a3513fc5..ea1c1ac18c94ccc1b2dfeab15c6956e393de8de5 100644 (file)
--- a/list.c
+++ b/list.c
@@ -51,13 +51,14 @@ static inline void uci_list_del(struct uci_list *ptr)
 }
 
 static struct uci_element *
-uci_alloc_generic(struct uci_context *ctx, const char *name, int size)
+uci_alloc_generic(struct uci_context *ctx, int type, const char *name, int size)
 {
        struct uci_element *e;
        void *ptr;
 
        ptr = uci_malloc(ctx, size + strlen(name) + 1);
        e = (struct uci_element *) ptr;
+       e->type = type;
        e->name = (char *) ptr + size;
        strcpy(e->name, name);
        uci_list_init(&e->list);