Skip to content

Commit 0572b37

Browse files
sctp: Fix fall-through warnings for Clang
In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple of warnings by explicitly adding a break statement and replacing a comment with a goto statement instead of letting the code fall through to the next case. Link: KSPP#115 Signed-off-by: Gustavo A. R. Silva <[email protected]>
1 parent 3754fa7 commit 0572b37

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/sctp/input.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ int sctp_v4_err(struct sk_buff *skb, __u32 info)
633633
break;
634634
case ICMP_REDIRECT:
635635
sctp_icmp_redirect(sk, transport, skb);
636-
/* Fall through to out_unlock. */
636+
goto out_unlock;
637637
default:
638638
goto out_unlock;
639639
}
@@ -1236,6 +1236,7 @@ static struct sctp_association *__sctp_rcv_walk_lookup(struct net *net,
12361236
net, ch, laddr,
12371237
sctp_hdr(skb)->source,
12381238
transportp);
1239+
break;
12391240
default:
12401241
break;
12411242
}

0 commit comments

Comments
 (0)