提交 7fd71b1e 编写于 作者: J Joe Perches 提交者: David S. Miller

sctp: Reduce switch/case indent

Make the case labels the same indent as the switch.

git diff -w shows useless break;s removed after returns
and a comment added to an unnecessary default: break;
because of a dubious gcc warning.
Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c4855389
...@@ -4008,31 +4008,32 @@ sctp_disposition_t sctp_sf_eat_auth(const struct sctp_endpoint *ep, ...@@ -4008,31 +4008,32 @@ sctp_disposition_t sctp_sf_eat_auth(const struct sctp_endpoint *ep,
auth_hdr = (struct sctp_authhdr *)chunk->skb->data; auth_hdr = (struct sctp_authhdr *)chunk->skb->data;
error = sctp_sf_authenticate(ep, asoc, type, chunk); error = sctp_sf_authenticate(ep, asoc, type, chunk);
switch (error) { switch (error) {
case SCTP_IERROR_AUTH_BAD_HMAC: case SCTP_IERROR_AUTH_BAD_HMAC:
/* Generate the ERROR chunk and discard the rest /* Generate the ERROR chunk and discard the rest
* of the packet * of the packet
*/ */
err_chunk = sctp_make_op_error(asoc, chunk, err_chunk = sctp_make_op_error(asoc, chunk,
SCTP_ERROR_UNSUP_HMAC, SCTP_ERROR_UNSUP_HMAC,
&auth_hdr->hmac_id, &auth_hdr->hmac_id,
sizeof(__u16), 0); sizeof(__u16), 0);
if (err_chunk) { if (err_chunk) {
sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, sctp_add_cmd_sf(commands, SCTP_CMD_REPLY,
SCTP_CHUNK(err_chunk)); SCTP_CHUNK(err_chunk));
} }
/* Fall Through */ /* Fall Through */
case SCTP_IERROR_AUTH_BAD_KEYID: case SCTP_IERROR_AUTH_BAD_KEYID:
case SCTP_IERROR_BAD_SIG: case SCTP_IERROR_BAD_SIG:
return sctp_sf_pdiscard(ep, asoc, type, arg, commands); return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
break;
case SCTP_IERROR_PROTO_VIOLATION: case SCTP_IERROR_PROTO_VIOLATION:
return sctp_sf_violation_chunklen(ep, asoc, type, arg, return sctp_sf_violation_chunklen(ep, asoc, type, arg,
commands); commands);
break;
case SCTP_IERROR_NOMEM: case SCTP_IERROR_NOMEM:
return SCTP_DISPOSITION_NOMEM; return SCTP_DISPOSITION_NOMEM;
default:
break; default: /* Prevent gcc warnings */
break;
} }
if (asoc->active_key_id != ntohs(auth_hdr->shkey_id)) { if (asoc->active_key_id != ntohs(auth_hdr->shkey_id)) {
......
...@@ -3257,11 +3257,11 @@ static int sctp_setsockopt_auth_chunk(struct sock *sk, ...@@ -3257,11 +3257,11 @@ static int sctp_setsockopt_auth_chunk(struct sock *sk,
return -EFAULT; return -EFAULT;
switch (val.sauth_chunk) { switch (val.sauth_chunk) {
case SCTP_CID_INIT: case SCTP_CID_INIT:
case SCTP_CID_INIT_ACK: case SCTP_CID_INIT_ACK:
case SCTP_CID_SHUTDOWN_COMPLETE: case SCTP_CID_SHUTDOWN_COMPLETE:
case SCTP_CID_AUTH: case SCTP_CID_AUTH:
return -EINVAL; return -EINVAL;
} }
/* add this chunk id to the endpoint */ /* add this chunk id to the endpoint */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册