diff options
author | Florian Westphal <fw@strlen.de> | 2019-02-08 17:02:22 +0100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2019-02-08 21:22:51 +0100 |
commit | 72931553828af0ce85f0562b9ff8ec7f4d28e050 (patch) | |
tree | 6fe42e2a99febc3ff783f63b8219de81215cf0d3 /src/rule.c | |
parent | 2cc91e6198e7ee8b9d0f8727c67a849fec393cd0 (diff) |
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 <fw@strlen.de>
Diffstat (limited to 'src/rule.c')
-rw-r--r-- | src/rule.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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: |