]> pilppa.com Git - uci.git/commitdiff
fix uci rename for anonymous sections
authorFelix Fietkau <nbd@openwrt.org>
Sat, 27 Dec 2008 18:52:18 +0000 (19:52 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 27 Dec 2008 18:52:18 +0000 (19:52 +0100)
list.c

diff --git a/list.c b/list.c
index b4f4da8faf0b6194e490be9f8bb4b2e74171dcd7..cd6d30522941f4d0411293d3a1e3c2f127dd57e7 100644 (file)
--- a/list.c
+++ b/list.c
@@ -527,6 +527,9 @@ int uci_rename(struct uci_context *ctx, struct uci_ptr *ptr)
                free(e->name);
        e->name = n;
 
+       if (e->type == UCI_TYPE_SECTION)
+               uci_to_section(e)->anonymous = false;
+
        return 0;
 }