Skip to content

Commit 62e6b7e

Browse files
lxindavem330
authored andcommitted
sctp: remove the typedef sctp_unrecognized_param_t
This patch is to remove the typedef sctp_unrecognized_param_t, and replace with struct sctp_unrecognized_param in the places where it's using this typedef. It is also to fix some indents in sctp_sf_do_unexpected_init() and sctp_sf_do_5_1B_init(). Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent f48ef4c commit 62e6b7e

2 files changed

Lines changed: 9 additions & 13 deletions

File tree

‎include/linux/sctp.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,10 @@ struct sctp_cookie_param {
348348
};
349349

350350
/* Section 3.3.3.1 Unrecognized Parameters (8) */
351-
typedef struct sctp_unrecognized_param {
351+
struct sctp_unrecognized_param {
352352
struct sctp_paramhdr param_hdr;
353353
struct sctp_paramhdr unrecognized;
354-
} sctp_unrecognized_param_t;
354+
};
355355

356356

357357

‎net/sctp/sm_statefuns.c‎

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -306,12 +306,10 @@ sctp_disposition_t sctp_sf_do_5_1B_init(struct net *net,
306306
void *arg,
307307
sctp_cmd_seq_t *commands)
308308
{
309-
struct sctp_chunk *chunk = arg;
310-
struct sctp_chunk *repl;
309+
struct sctp_chunk *chunk = arg, *repl, *err_chunk;
310+
struct sctp_unrecognized_param *unk_param;
311311
struct sctp_association *new_asoc;
312-
struct sctp_chunk *err_chunk;
313312
struct sctp_packet *packet;
314-
sctp_unrecognized_param_t *unk_param;
315313
int len;
316314

317315
/* 6.10 Bundling
@@ -435,7 +433,7 @@ sctp_disposition_t sctp_sf_do_5_1B_init(struct net *net,
435433
* construct the parameters in INIT ACK by copying the
436434
* ERROR causes over.
437435
*/
438-
unk_param = (sctp_unrecognized_param_t *)
436+
unk_param = (struct sctp_unrecognized_param *)
439437
((__u8 *)(err_chunk->chunk_hdr) +
440438
sizeof(struct sctp_chunkhdr));
441439
/* Replace the cause code with the "Unrecognized parameter"
@@ -1419,13 +1417,11 @@ static sctp_disposition_t sctp_sf_do_unexpected_init(
14191417
const sctp_subtype_t type,
14201418
void *arg, sctp_cmd_seq_t *commands)
14211419
{
1422-
sctp_disposition_t retval;
1423-
struct sctp_chunk *chunk = arg;
1424-
struct sctp_chunk *repl;
1420+
struct sctp_chunk *chunk = arg, *repl, *err_chunk;
1421+
struct sctp_unrecognized_param *unk_param;
14251422
struct sctp_association *new_asoc;
1426-
struct sctp_chunk *err_chunk;
14271423
struct sctp_packet *packet;
1428-
sctp_unrecognized_param_t *unk_param;
1424+
sctp_disposition_t retval;
14291425
int len;
14301426

14311427
/* 6.10 Bundling
@@ -1555,7 +1551,7 @@ static sctp_disposition_t sctp_sf_do_unexpected_init(
15551551
* construct the parameters in INIT ACK by copying the
15561552
* ERROR causes over.
15571553
*/
1558-
unk_param = (sctp_unrecognized_param_t *)
1554+
unk_param = (struct sctp_unrecognized_param *)
15591555
((__u8 *)(err_chunk->chunk_hdr) +
15601556
sizeof(struct sctp_chunkhdr));
15611557
/* Replace the cause code with the "Unrecognized parameter"

0 commit comments

Comments
 (0)