- children = ec_config_dict_get(config, "children");
- if (children == NULL) {
- errno = EINVAL;
- goto fail;
- }
-
- n = 0;
- TAILQ_FOREACH(child, &children->list, next)
- n++;
-
- table = ec_malloc(n * sizeof(*table));
+ table = ec_node_config_node_list_to_table(
+ ec_config_dict_get(config, "children"), &len);