Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8542dce authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Pablo Neira Ayuso
Browse files

netfilter: mark expected switch fall-throughs



In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 9dae47ab
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1386,7 +1386,7 @@ ip_set_dump_start(struct sk_buff *skb, struct netlink_callback *cb)
				goto next_set;
			if (set->variant->uref)
				set->variant->uref(set, cb, true);
			/* Fall through and add elements */
			/* fall through */
		default:
			rcu_read_lock_bh();
			ret = set->variant->list(set, skb, cb);
+1 −0
Original line number Diff line number Diff line
@@ -315,6 +315,7 @@ tcp_csum_check(int af, struct sk_buff *skb, struct ip_vs_protocol *pp)
	switch (skb->ip_summed) {
	case CHECKSUM_NONE:
		skb->csum = skb_checksum(skb, tcphoff, skb->len - tcphoff, 0);
		/* fall through */
	case CHECKSUM_COMPLETE:
#ifdef CONFIG_IP_VS_IPV6
		if (af == AF_INET6) {
+1 −0
Original line number Diff line number Diff line
@@ -319,6 +319,7 @@ udp_csum_check(int af, struct sk_buff *skb, struct ip_vs_protocol *pp)
		case CHECKSUM_NONE:
			skb->csum = skb_checksum(skb, udphoff,
						 skb->len - udphoff, 0);
			/* fall through */
		case CHECKSUM_COMPLETE:
#ifdef CONFIG_IP_VS_IPV6
			if (af == AF_INET6) {
+3 −0
Original line number Diff line number Diff line
@@ -262,12 +262,15 @@ static unsigned int get_uint(struct bitstr *bs, int b)
	case 4:
		v |= *bs->cur++;
		v <<= 8;
		/* fall through */
	case 3:
		v |= *bs->cur++;
		v <<= 8;
		/* fall through */
	case 2:
		v |= *bs->cur++;
		v <<= 8;
		/* fall through */
	case 1:
		v |= *bs->cur++;
		break;
+2 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ static void nft_cmp_eval(const struct nft_expr *expr,
	case NFT_CMP_LT:
		if (d == 0)
			goto mismatch;
		/* fall through */
	case NFT_CMP_LTE:
		if (d > 0)
			goto mismatch;
@@ -51,6 +52,7 @@ static void nft_cmp_eval(const struct nft_expr *expr,
	case NFT_CMP_GT:
		if (d == 0)
			goto mismatch;
		/* fall through */
	case NFT_CMP_GTE:
		if (d < 0)
			goto mismatch;
Loading