From: Pablo Neira Ayuso Date: Wed, 13 Aug 2025 13:16:22 +0000 (+0200) Subject: expression: remove compound_expr_add() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b289d636e4bf619ae21562b74dd5ff9fa895b514;p=thirdparty%2Fnftables.git expression: remove compound_expr_add() No more users of this function after conversion to type safe variant, remove it. Signed-off-by: Pablo Neira Ayuso --- diff --git a/include/expression.h b/include/expression.h index ad469db2..d36eea97 100644 --- a/include/expression.h +++ b/include/expression.h @@ -525,7 +525,6 @@ struct expr *range_expr_to_prefix(struct expr *range); extern struct expr *compound_expr_alloc(const struct location *loc, enum expr_types etypes); -extern void compound_expr_add(struct expr *compound, struct expr *expr); extern void compound_expr_remove(struct expr *compound, struct expr *expr); extern void list_expr_sort(struct list_head *head); extern void list_splice_sorted(struct list_head *list, struct list_head *head); diff --git a/src/expression.c b/src/expression.c index 8cf06b9a..bceb2a32 100644 --- a/src/expression.c +++ b/src/expression.c @@ -1048,12 +1048,6 @@ static void compound_expr_print(const struct expr *expr, const char *delim, } } -void compound_expr_add(struct expr *compound, struct expr *expr) -{ - list_add_tail(&expr->list, &compound->expr_set.expressions); - compound->expr_set.size++; -} - void compound_expr_remove(struct expr *compound, struct expr *expr) { compound->expr_set.size--;