From e8c7a780d2755f5cccd7369f32f771bab2fcaf63 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 13 Aug 2025 15:15:08 +0200 Subject: src: replace compound_expr_add() by type safe list_expr_add() Replace compound_expr_add() by list_expr_add() to validate type. Signed-off-by: Pablo Neira Ayuso --- src/parser_json.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/parser_json.c') diff --git a/src/parser_json.c b/src/parser_json.c index 6ed1841c..c107dfc8 100644 --- a/src/parser_json.c +++ b/src/parser_json.c @@ -1704,7 +1704,7 @@ static struct expr *json_parse_expr(struct json_ctx *ctx, json_t *root) expr_free(list); return NULL; } - compound_expr_add(list, expr); + list_expr_add(list, expr); } return list; case JSON_TRUE: @@ -3038,7 +3038,7 @@ static struct expr *json_parse_devs(struct json_ctx *ctx, json_t *root) return NULL; } - compound_expr_add(expr, tmp); + list_expr_add(expr, tmp); return expr; } if (!json_is_array(root)) { @@ -3059,7 +3059,7 @@ static struct expr *json_parse_devs(struct json_ctx *ctx, json_t *root) expr_free(expr); return NULL; } - compound_expr_add(expr, tmp); + list_expr_add(expr, tmp); } return expr; } -- cgit v1.2.3