X-Git-Url: http://git.droids-corp.org/?p=protos%2Flibecoli.git;a=blobdiff_plain;f=src%2Fecoli_node_file.c;fp=src%2Fecoli_node_file.c;h=933b9973f1877ca9e2d35b86cc50f094c6b9bcd8;hp=ff77e011f883b7514b7dac7497ed8e5cb8600afa;hb=331d87b8f34493ea7eb4db75fa9d90b2e3ed503b;hpb=67b4d8d2b2593e3e64a848ce548bc0fd76bc440a diff --git a/src/ecoli_node_file.c b/src/ecoli_node_file.c index ff77e01..933b997 100644 --- a/src/ecoli_node_file.c +++ b/src/ecoli_node_file.c @@ -36,11 +36,11 @@ struct ec_node_file { static int ec_node_file_parse(const struct ec_node *node, - struct ec_pnode *state, + struct ec_pnode *pstate, const struct ec_strvec *strvec) { (void)node; - (void)state; + (void)pstate; if (ec_strvec_len(strvec) == 0) return EC_PARSE_NOMATCH; @@ -210,8 +210,8 @@ ec_node_file_complete(const struct ec_node *node, if (ec_asprintf(&disp_str, "%s", de->d_name) < 0) goto fail; } - if (ec_comp_add_item(comp, node, &item, - type, input, comp_str) < 0) + item = ec_comp_add_item(comp, node, type, input, comp_str); + if (item == NULL) goto out; /* fix the display string: we don't want to display the full