unsigned int i;
/* get parsed string vector, it should contain only one str */
- vec = ec_pnode_strvec(var);
+ vec = ec_pnode_get_strvec(var);
if (ec_strvec_len(vec) != 1) {
errno = EINVAL;
return -1;
(void)userctx;
/* get parsed string vector, it should contain only one str */
- vec = ec_pnode_strvec(operator);
+ vec = ec_pnode_get_strvec(operator);
if (ec_strvec_len(vec) != 1) {
errno = EINVAL;
return -1;
(void)userctx;
/* get parsed string vector, it should contain only one str */
- vec = ec_pnode_strvec(operator);
+ vec = ec_pnode_get_strvec(operator);
if (ec_strvec_len(vec) > 1) {
errno = EINVAL;
return -1;
(void)close_paren;
/* get parsed string vector, it should contain only one str */
- vec = ec_pnode_strvec(open_paren);
+ vec = ec_pnode_get_strvec(open_paren);
if (ec_strvec_len(vec) != 1) {
errno = EINVAL;
return -1;
errno = EINVAL;
goto fail;
}
- if (!ec_pnode_has_child(p)) {
- errno = EINVAL;
- goto fail;
- }
ret = ec_node_expr_eval(&result, ec_node_cmd_expr,
ec_pnode_get_first_child(p),
}
static int
-ec_node_cmd_parse(const struct ec_node *node, struct ec_pnode *state,
+ec_node_cmd_parse(const struct ec_node *node, struct ec_pnode *pstate,
const struct ec_strvec *strvec)
{
struct ec_node_cmd *priv = ec_node_priv(node);
- return ec_parse_child(priv->cmd, state, strvec);
+ return ec_parse_child(priv->cmd, pstate, strvec);
}
static int