From: Felix Fietkau Date: Sat, 29 Aug 2009 16:37:27 +0000 (+0200) Subject: fix ucimap_set_changed X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuci.git;a=commitdiff_plain;h=f107b5a34f5f20ff373683472cfa5978da640132;ds=sidebyside fix ucimap_set_changed --- diff --git a/ucimap.c b/ucimap.c index c2d78f0..cb86a4f 100644 --- 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++; } }