aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/sm_make_chunk.c
diff options
context:
space:
mode:
authorwangweidong <wangweidong1@huawei.com>2013-12-22 23:16:52 -0500
committerDavid S. Miller <davem@davemloft.net>2013-12-26 13:47:48 -0500
commitf7010e61442c80333b38aa026a551043a341fb8d (patch)
tree678fc701ba550673b88fb67a72dac1907bd65c1d /net/sctp/sm_make_chunk.c
parent26ac8e5fe1562831e68ccd9f7057aade37aab2a3 (diff)
sctp: fix checkpatch errors with indent
fix checkpatch errors below: ERROR: switch and case should be at the same inden ERROR: code indent should use tabs where possible Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Wang Weidong <wangweidong1@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
-rw-r--r--net/sctp/sm_make_chunk.c65
1 files changed, 32 insertions, 33 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index d53af47efa7d..e5f7cdb42a85 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1967,13 +1967,13 @@ static int sctp_verify_ext_param(struct net *net, union sctp_params param)
1967 1967
1968 for (i = 0; i < num_ext; i++) { 1968 for (i = 0; i < num_ext; i++) {
1969 switch (param.ext->chunks[i]) { 1969 switch (param.ext->chunks[i]) {
1970 case SCTP_CID_AUTH: 1970 case SCTP_CID_AUTH:
1971 have_auth = 1; 1971 have_auth = 1;
1972 break; 1972 break;
1973 case SCTP_CID_ASCONF: 1973 case SCTP_CID_ASCONF:
1974 case SCTP_CID_ASCONF_ACK: 1974 case SCTP_CID_ASCONF_ACK:
1975 have_asconf = 1; 1975 have_asconf = 1;
1976 break; 1976 break;
1977 } 1977 }
1978 } 1978 }
1979 1979
@@ -2000,25 +2000,24 @@ static void sctp_process_ext_param(struct sctp_association *asoc,
2000 2000
2001 for (i = 0; i < num_ext; i++) { 2001 for (i = 0; i < num_ext; i++) {
2002 switch (param.ext->chunks[i]) { 2002 switch (param.ext->chunks[i]) {
2003 case SCTP_CID_FWD_TSN: 2003 case SCTP_CID_FWD_TSN:
2004 if (net->sctp.prsctp_enable && 2004 if (net->sctp.prsctp_enable && !asoc->peer.prsctp_capable)
2005 !asoc->peer.prsctp_capable)
2006 asoc->peer.prsctp_capable = 1; 2005 asoc->peer.prsctp_capable = 1;
2007 break; 2006 break;
2008 case SCTP_CID_AUTH: 2007 case SCTP_CID_AUTH:
2009 /* if the peer reports AUTH, assume that he 2008 /* if the peer reports AUTH, assume that he
2010 * supports AUTH. 2009 * supports AUTH.
2011 */ 2010 */
2012 if (net->sctp.auth_enable) 2011 if (net->sctp.auth_enable)
2013 asoc->peer.auth_capable = 1; 2012 asoc->peer.auth_capable = 1;
2014 break; 2013 break;
2015 case SCTP_CID_ASCONF: 2014 case SCTP_CID_ASCONF:
2016 case SCTP_CID_ASCONF_ACK: 2015 case SCTP_CID_ASCONF_ACK:
2017 if (net->sctp.addip_enable) 2016 if (net->sctp.addip_enable)
2018 asoc->peer.asconf_capable = 1; 2017 asoc->peer.asconf_capable = 1;
2019 break; 2018 break;
2020 default: 2019 default:
2021 break; 2020 break;
2022 } 2021 }
2023 } 2022 }
2024} 2023}
@@ -2266,14 +2265,14 @@ int sctp_verify_init(struct net *net, const struct sctp_association *asoc,
2266 2265
2267 result = sctp_verify_param(net, asoc, param, cid, chunk, errp); 2266 result = sctp_verify_param(net, asoc, param, cid, chunk, errp);
2268 switch (result) { 2267 switch (result) {
2269 case SCTP_IERROR_ABORT: 2268 case SCTP_IERROR_ABORT:
2270 case SCTP_IERROR_NOMEM: 2269 case SCTP_IERROR_NOMEM:
2271 return 0; 2270 return 0;
2272 case SCTP_IERROR_ERROR: 2271 case SCTP_IERROR_ERROR:
2273 return 1; 2272 return 1;
2274 case SCTP_IERROR_NO_ERROR: 2273 case SCTP_IERROR_NO_ERROR:
2275 default: 2274 default:
2276 break; 2275 break;
2277 } 2276 }
2278 2277
2279 } /* for (loop through all parameters) */ 2278 } /* for (loop through all parameters) */