aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-07-01 05:43:11 -0400
committerDavid S. Miller <davem@davemloft.net>2011-07-01 19:11:16 -0400
commit7fd71b1e0787d4d32c6225ca59e23e522cd67cc3 (patch)
tree4668b677bfc6f1519ba1e02361c0ccdaa9ccd3e2 /net/sctp
parentc485538901e0334a3016241bf73b864216ff2e73 (diff)
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: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/sm_statefuns.c51
-rw-r--r--net/sctp/socket.c10
2 files changed, 31 insertions, 30 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index a297283154d5..7d00b1777c63 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -4008,31 +4008,32 @@ sctp_disposition_t sctp_sf_eat_auth(const struct sctp_endpoint *ep,
4008 auth_hdr = (struct sctp_authhdr *)chunk->skb->data; 4008 auth_hdr = (struct sctp_authhdr *)chunk->skb->data;
4009 error = sctp_sf_authenticate(ep, asoc, type, chunk); 4009 error = sctp_sf_authenticate(ep, asoc, type, chunk);
4010 switch (error) { 4010 switch (error) {
4011 case SCTP_IERROR_AUTH_BAD_HMAC: 4011 case SCTP_IERROR_AUTH_BAD_HMAC:
4012 /* Generate the ERROR chunk and discard the rest 4012 /* Generate the ERROR chunk and discard the rest
4013 * of the packet 4013 * of the packet
4014 */ 4014 */
4015 err_chunk = sctp_make_op_error(asoc, chunk, 4015 err_chunk = sctp_make_op_error(asoc, chunk,
4016 SCTP_ERROR_UNSUP_HMAC, 4016 SCTP_ERROR_UNSUP_HMAC,
4017 &auth_hdr->hmac_id, 4017 &auth_hdr->hmac_id,
4018 sizeof(__u16), 0); 4018 sizeof(__u16), 0);
4019 if (err_chunk) { 4019 if (err_chunk) {
4020 sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, 4020 sctp_add_cmd_sf(commands, SCTP_CMD_REPLY,
4021 SCTP_CHUNK(err_chunk)); 4021 SCTP_CHUNK(err_chunk));
4022 } 4022 }
4023 /* Fall Through */ 4023 /* Fall Through */
4024 case SCTP_IERROR_AUTH_BAD_KEYID: 4024 case SCTP_IERROR_AUTH_BAD_KEYID:
4025 case SCTP_IERROR_BAD_SIG: 4025 case SCTP_IERROR_BAD_SIG:
4026 return sctp_sf_pdiscard(ep, asoc, type, arg, commands); 4026 return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
4027 break; 4027
4028 case SCTP_IERROR_PROTO_VIOLATION: 4028 case SCTP_IERROR_PROTO_VIOLATION:
4029 return sctp_sf_violation_chunklen(ep, asoc, type, arg, 4029 return sctp_sf_violation_chunklen(ep, asoc, type, arg,
4030 commands); 4030 commands);
4031 break; 4031
4032 case SCTP_IERROR_NOMEM: 4032 case SCTP_IERROR_NOMEM:
4033 return SCTP_DISPOSITION_NOMEM; 4033 return SCTP_DISPOSITION_NOMEM;
4034 default: 4034
4035 break; 4035 default: /* Prevent gcc warnings */
4036 break;
4036 } 4037 }
4037 4038
4038 if (asoc->active_key_id != ntohs(auth_hdr->shkey_id)) { 4039 if (asoc->active_key_id != ntohs(auth_hdr->shkey_id)) {
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index fd31b3616a33..1c6aec1f9ec4 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -3257,11 +3257,11 @@ static int sctp_setsockopt_auth_chunk(struct sock *sk,
3257 return -EFAULT; 3257 return -EFAULT;
3258 3258
3259 switch (val.sauth_chunk) { 3259 switch (val.sauth_chunk) {
3260 case SCTP_CID_INIT: 3260 case SCTP_CID_INIT:
3261 case SCTP_CID_INIT_ACK: 3261 case SCTP_CID_INIT_ACK:
3262 case SCTP_CID_SHUTDOWN_COMPLETE: 3262 case SCTP_CID_SHUTDOWN_COMPLETE:
3263 case SCTP_CID_AUTH: 3263 case SCTP_CID_AUTH:
3264 return -EINVAL; 3264 return -EINVAL;
3265 } 3265 }
3266 3266
3267 /* add this chunk id to the endpoint */ 3267 /* add this chunk id to the endpoint */