Browse Source

fix ucimap_set_changed

Felix Fietkau 14 years ago
parent
commit
f107b5a34f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      ucimap.c

+ 2 - 1
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++;
 	}
 }