From 1788f545aae285fa3cd6595d5d25b2ae1b215282 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 19 Sep 2018 15:16:45 +0200 Subject: Mark fall through cases in switch() statements Typical covscan complaint, non-empty fall throughs should be marked as such. There was but a single case which should break instead, namely in libebt_log.c: It is not critical, since the next case merely asserts 'invert' being zero (which can't be as it was checked before). But while being at it, introduce log_chk_inv() to consolidate the semantically equal cases for the various log types. Signed-off-by: Phil Sutter Signed-off-by: Florian Westphal --- iptables/nft-shared.c | 1 + 1 file changed, 1 insertion(+) (limited to 'iptables/nft-shared.c') diff --git a/iptables/nft-shared.c b/iptables/nft-shared.c index c8414294..a38ffd3a 100644 --- a/iptables/nft-shared.c +++ b/iptables/nft-shared.c @@ -547,6 +547,7 @@ void nft_parse_immediate(struct nft_xt_ctx *ctx, struct nftnl_expr *e) break;; case NFT_GOTO: nft_goto = true; + /* fall through */ case NFT_JUMP: jumpto = chain; break; -- cgit v1.2.3