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++;
}
}
static char buf[32];
const char *str = NULL;
+ if (ucimap_is_list(om->type))
+ continue;
+
data = ucimap_get_data(sd, om);
if (!TEST_BIT(sd->cmap, i))
continue;
sprintf(buf, "%d", !!data->b);
str = buf;
break;
+ default:
+ continue;
}
ptr.value = str;