/* no completion */
if (str[n] != '\0')
- return 0; // XXX add a no_match instead?
+ return EC_PARSED_NOMATCH;
if (ec_completed_add_item(completed, gen_node, NULL, EC_COMP_FULL,
str, node->string) < 0)
if (str == NULL)
return -EINVAL;
- if (node->string != NULL)
- return -EEXIST; // XXX allow to replace
-
+ ec_free(node->string);
node->string = ec_strdup(str);
if (node->string == NULL)
return -ENOMEM;