use EC_NO_ID instead of NULL
[protos/libecoli.git] / lib / ecoli_node_option.c
index 1dcdd88..6f8d229 100644 (file)
@@ -57,10 +57,11 @@ ec_node_option_parse(const struct ec_node *gen_node,
        int ret;
 
        ret = ec_node_parse_child(node->child, state, strvec);
+       if (ret < 0)
+               return ret;
+
        if (ret == EC_PARSED_NOMATCH)
                return 0;
-       else if (ret < 0)
-               return ret;
 
        return ret;
 }
@@ -68,12 +69,11 @@ ec_node_option_parse(const struct ec_node *gen_node,
 static int
 ec_node_option_complete(const struct ec_node *gen_node,
                        struct ec_completed *completed,
-                       struct ec_parsed *parsed,
                        const struct ec_strvec *strvec)
 {
        struct ec_node_option *node = (struct ec_node_option *)gen_node;
 
-       return ec_node_complete_child(node->child, completed, parsed, strvec);
+       return ec_node_complete_child(node->child, completed, strvec);
 }
 
 static void ec_node_option_free_priv(struct ec_node *gen_node)
@@ -122,7 +122,7 @@ static int ec_node_option_testcase(void)
        struct ec_node *node;
        int ret = 0;
 
-       node = ec_node_option(NULL, ec_node_str(NULL, "foo"));
+       node = ec_node_option(EC_NO_ID, ec_node_str(EC_NO_ID, "foo"));
        if (node == NULL) {
                EC_LOG(EC_LOG_ERR, "cannot create node\n");
                return -1;
@@ -134,7 +134,7 @@ static int ec_node_option_testcase(void)
        ec_node_free(node);
 
        /* test completion */
-       node = ec_node_option(NULL, ec_node_str(NULL, "foo"));
+       node = ec_node_option(EC_NO_ID, ec_node_str(EC_NO_ID, "foo"));
        if (node == NULL) {
                EC_LOG(EC_LOG_ERR, "cannot create node\n");
                return -1;