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: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
Родитель
9dae47aba0
Коммит
e8542dcec0
|
@ -1386,7 +1386,7 @@ dump_last:
|
|||
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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1397,7 +1397,7 @@ static void *xt_mttg_seq_next(struct seq_file *seq, void *v, loff_t *ppos,
|
|||
trav->curr = trav->curr->next;
|
||||
if (trav->curr != trav->head)
|
||||
break;
|
||||
/* fallthru, _stop will unlock */
|
||||
/* fall through */
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче