From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH nft,v3 2/3] optimize: incorrect assert() for unexpected expression type
Date: Thu, 3 Mar 2022 15:56:48 +0100 [thread overview]
Message-ID: <20220303145649.843320-2-pablo@netfilter.org> (raw)
In-Reply-To: <20220303145649.843320-1-pablo@netfilter.org>
assert(1) is noop, this should be assert(0) instead.
Fixes: 561aa3cfa8da ("optimize: merge verdict maps with same lookup key")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
v3: no changes
src/optimize.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/optimize.c b/src/optimize.c
index af075da437f9..6ba7e5a10cf8 100644
--- a/src/optimize.c
+++ b/src/optimize.c
@@ -362,11 +362,11 @@ static void merge_verdict_stmts(const struct optimize_ctx *ctx,
merge_vmap(ctx, stmt_a, stmt_b);
break;
default:
- assert(1);
+ assert(0);
}
break;
default:
- assert(1);
+ assert(0);
break;
}
}
@@ -385,7 +385,7 @@ static void merge_stmts(const struct optimize_ctx *ctx,
merge_verdict_stmts(ctx, from, to, merge, stmt_a);
break;
default:
- assert(1);
+ assert(0);
}
}
--
2.30.2
next prev parent reply other threads:[~2022-03-03 14:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-03 14:56 [PATCH nft,v3 1/3] optimize: more robust statement merge with vmap Pablo Neira Ayuso
2022-03-03 14:56 ` Pablo Neira Ayuso [this message]
2022-03-03 14:56 ` [PATCH nft,v3 3/3] optimize: do not merge unsupported statement expressions Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220303145649.843320-2-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).