X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=list.c;h=ea1c1ac18c94ccc1b2dfeab15c6956e393de8de5;hp=357b2e407efd3f49af1d5495841c6677a3513fc5;hb=28bce261b2b5139fe6ccaba4358b73fcccf8097b;hpb=8f5a6c07caaaf5bd692623d1ed8ffbfa20f564d8 diff --git a/list.c b/list.c index 357b2e4..ea1c1ac 100644 --- 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);