From 72931553828af0ce85f0562b9ff8ec7f4d28e050 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Fri, 8 Feb 2019 17:02:22 +0100 Subject: src: expr: add expression etype Temporary kludge to remove all the expr->ops->type == ... patterns. Followup patch will remove expr->ops, and make expr_ops() lookup the correct expr_ops struct instead to reduce struct expr size. Signed-off-by: Florian Westphal --- src/rule.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/rule.c') diff --git a/src/rule.c b/src/rule.c index 73b78c75..a3b2dbdb 100644 --- a/src/rule.c +++ b/src/rule.c @@ -2613,11 +2613,11 @@ static void payload_try_merge(const struct rule *rule) if (stmt->ops->type != STMT_EXPRESSION) goto do_merge; - if (stmt->expr->ops->type != EXPR_RELATIONAL) + if (stmt->expr->etype != EXPR_RELATIONAL) continue; - if (stmt->expr->left->ops->type != EXPR_PAYLOAD) + if (stmt->expr->left->etype != EXPR_PAYLOAD) continue; - if (stmt->expr->right->ops->type != EXPR_VALUE) + if (stmt->expr->right->etype != EXPR_VALUE) continue; switch (stmt->expr->op) { case OP_EQ: -- cgit v1.2.3