struct ec_node_expr *node = (struct ec_node_expr *)gen_node;
int ret;
+ ret = ec_node_check_type(gen_node, &ec_node_expr_type);
+ if (ret < 0)
+ return ret;
+
ret = -EINVAL;
if (val_node == NULL)
goto fail;
struct ec_node **bin_ops;
int ret;
- // XXX check node type
+ ret = ec_node_check_type(gen_node, &ec_node_expr_type);
+ if (ret < 0)
+ return ret;
ret = -EINVAL;
if (node == NULL || op == NULL)
struct ec_node **pre_ops;
int ret;
- // XXX check node type
+ ret = ec_node_check_type(gen_node, &ec_node_expr_type);
+ if (ret < 0)
+ return ret;
ret = -EINVAL;
if (node == NULL || op == NULL)
struct ec_node **post_ops;
int ret;
- // XXX check node type
+ ret = ec_node_check_type(gen_node, &ec_node_expr_type);
+ if (ret < 0)
+ return ret;
ret = -EINVAL;
if (node == NULL || op == NULL)
struct ec_node **open_ops, **close_ops;
int ret;
- // XXX check node type
+ ret = ec_node_check_type(gen_node, &ec_node_expr_type);
+ if (ret < 0)
+ return ret;
ret = -EINVAL;
if (node == NULL || open == NULL || close == NULL)
PAREN_OPEN,
PAREN_CLOSE,
};
+
static enum expr_node_type get_node_type(const struct ec_node *expr_gen_node,
const struct ec_node *check)
{