+ if (o->type == UCI_TYPE_LIST) {
+ uci_foreach_element(&o->v.list, tmp) {
+ n_elements++;
+ }
+ } else if ((o->type == UCI_TYPE_STRING) &&
+ ucimap_is_list_auto(om->type)) {
+ const char *data = o->v.string;
+ do {
+ while (isspace(*data))
+ data++;
+
+ if (!*data)
+ break;
+
+ n_elements++;
+
+ while (*data && !isspace(*data))
+ data++;
+ } while (*data);
+
+ /* for the duplicated data string */
+ if (n_elements > 0)
+ n_alloc++;