]> pilppa.com Git - uci.git/commitdiff
fix ucimap_set_changed
authorFelix Fietkau <nbd@openwrt.org>
Sat, 29 Aug 2009 16:37:27 +0000 (18:37 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 29 Aug 2009 16:37:27 +0000 (18:37 +0200)
ucimap.c

index c2d78f0a856db4e6f8b3187861dc0d3436cd9938..cb86a4f34f61219645204e069245f666bfd8735a 100644 (file)
--- a/ucimap.c
+++ b/ucimap.c
@@ -388,13 +388,14 @@ ucimap_set_changed(void *section, void *field)
        struct uci_sectmap *sm = sd->sm;
        struct uci_optmap *om;
        int ofs = (char *)field - (char *)section;
-       int i;
+       int i = 0;
 
        ucimap_foreach_option(sm, om) {
                if (om->offset == ofs) {
                        SET_BIT(sd->cmap, i);
                        break;
                }
+               i++;
        }
 }