netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft] evaluate: remove superfluous check in set_evaluate()
@ 2020-06-07 16:21 Pablo Neira Ayuso
  2020-06-07 16:21 ` [PATCH nft] netlink: release dummy rule object from netlink_parse_set_expr() Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Pablo Neira Ayuso @ 2020-06-07 16:21 UTC (permalink / raw)
  To: netfilter-devel

If set_is_objmap() is true, then set->data is always NULL.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 src/evaluate.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/evaluate.c b/src/evaluate.c
index fb58c053d4ae..42040b6efe02 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -3532,11 +3532,6 @@ static int set_evaluate(struct eval_ctx *ctx, struct set *set)
 			return set_key_data_error(ctx, set,
 						  set->data->dtype, type);
 	} else if (set_is_objmap(set->flags)) {
-		if (set->data) {
-			assert(set->data->etype == EXPR_VALUE);
-			assert(set->data->dtype == &string_type);
-		}
-
 		assert(set->data == NULL);
 		set->data = constant_expr_alloc(&netlink_location, &string_type,
 						BYTEORDER_HOST_ENDIAN,
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-07 16:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-07 16:21 [PATCH nft] evaluate: remove superfluous check in set_evaluate() Pablo Neira Ayuso
2020-06-07 16:21 ` [PATCH nft] netlink: release dummy rule object from netlink_parse_set_expr() Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).