get config
[protos/libecoli.git] / lib / ecoli_node_many.c
index 7748045..60256ef 100644 (file)
@@ -42,10 +42,8 @@ static int ec_node_many_parse(const struct ec_node *gen_node,
        for (count = 0; node->max == 0 || count < node->max; count++) {
                childvec = ec_strvec_ndup(strvec, off,
                        ec_strvec_len(strvec) - off);
-               if (childvec == NULL) {
-                       ret = -ENOMEM;
+               if (childvec == NULL)
                        goto fail;
-               }
 
                ret = ec_node_parse_child(node->child, state, childvec);
                if (ret < 0)
@@ -77,7 +75,7 @@ static int ec_node_many_parse(const struct ec_node *gen_node,
 
 fail:
        ec_strvec_free(childvec);
-       return ret;
+       return -1;
 }
 
 static int
@@ -181,6 +179,7 @@ struct ec_node *ec_node_many(const char *id, struct ec_node *child,
        if (child == NULL)
                return NULL;
 
+       // XXX ec_node_add_child()
        node = (struct ec_node_many *)__ec_node(&ec_node_many_type, id);
        if (node == NULL) {
                ec_node_free(child);