From 75ab7957feb78c53641331587f0f2ca8d75ccf8c Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 13 Aug 2025 15:11:09 +0200 Subject: src: add expr_type_catchall() helper and use it Add helper function to check if this is a catchall expression. Signed-off-by: Pablo Neira Ayuso --- include/expression.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/expression.h') diff --git a/include/expression.h b/include/expression.h index 7185ee66..acd0fd3d 100644 --- a/include/expression.h +++ b/include/expression.h @@ -558,6 +558,9 @@ extern struct expr *set_elem_expr_alloc(const struct location *loc, struct expr *set_elem_catchall_expr_alloc(const struct location *loc); +#define expr_type_catchall(__expr) \ + ((__expr)->etype == EXPR_SET_ELEM_CATCHALL) + extern void range_expr_value_low(mpz_t rop, const struct expr *expr); extern void range_expr_value_high(mpz_t rop, const struct expr *expr); void range_expr_swap_values(struct expr *range); -- cgit v1.2.3