Commit 62e6b7e4 authored by Xin Long's avatar Xin Long Committed by David S. Miller

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: default avatarXin Long <lucien.xin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f48ef4c7
...@@ -348,10 +348,10 @@ struct sctp_cookie_param { ...@@ -348,10 +348,10 @@ struct sctp_cookie_param {
}; };
/* Section 3.3.3.1 Unrecognized Parameters (8) */ /* Section 3.3.3.1 Unrecognized Parameters (8) */
typedef struct sctp_unrecognized_param { struct sctp_unrecognized_param {
struct sctp_paramhdr param_hdr; struct sctp_paramhdr param_hdr;
struct sctp_paramhdr unrecognized; struct sctp_paramhdr unrecognized;
} sctp_unrecognized_param_t; };
......
...@@ -306,12 +306,10 @@ sctp_disposition_t sctp_sf_do_5_1B_init(struct net *net, ...@@ -306,12 +306,10 @@ sctp_disposition_t sctp_sf_do_5_1B_init(struct net *net,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
struct sctp_chunk *chunk = arg; struct sctp_chunk *chunk = arg, *repl, *err_chunk;
struct sctp_chunk *repl; struct sctp_unrecognized_param *unk_param;
struct sctp_association *new_asoc; struct sctp_association *new_asoc;
struct sctp_chunk *err_chunk;
struct sctp_packet *packet; struct sctp_packet *packet;
sctp_unrecognized_param_t *unk_param;
int len; int len;
/* 6.10 Bundling /* 6.10 Bundling
...@@ -435,7 +433,7 @@ sctp_disposition_t sctp_sf_do_5_1B_init(struct net *net, ...@@ -435,7 +433,7 @@ sctp_disposition_t sctp_sf_do_5_1B_init(struct net *net,
* construct the parameters in INIT ACK by copying the * construct the parameters in INIT ACK by copying the
* ERROR causes over. * ERROR causes over.
*/ */
unk_param = (sctp_unrecognized_param_t *) unk_param = (struct sctp_unrecognized_param *)
((__u8 *)(err_chunk->chunk_hdr) + ((__u8 *)(err_chunk->chunk_hdr) +
sizeof(struct sctp_chunkhdr)); sizeof(struct sctp_chunkhdr));
/* Replace the cause code with the "Unrecognized parameter" /* Replace the cause code with the "Unrecognized parameter"
...@@ -1419,13 +1417,11 @@ static sctp_disposition_t sctp_sf_do_unexpected_init( ...@@ -1419,13 +1417,11 @@ static sctp_disposition_t sctp_sf_do_unexpected_init(
const sctp_subtype_t type, const sctp_subtype_t type,
void *arg, sctp_cmd_seq_t *commands) void *arg, sctp_cmd_seq_t *commands)
{ {
sctp_disposition_t retval; struct sctp_chunk *chunk = arg, *repl, *err_chunk;
struct sctp_chunk *chunk = arg; struct sctp_unrecognized_param *unk_param;
struct sctp_chunk *repl;
struct sctp_association *new_asoc; struct sctp_association *new_asoc;
struct sctp_chunk *err_chunk;
struct sctp_packet *packet; struct sctp_packet *packet;
sctp_unrecognized_param_t *unk_param; sctp_disposition_t retval;
int len; int len;
/* 6.10 Bundling /* 6.10 Bundling
...@@ -1555,7 +1551,7 @@ static sctp_disposition_t sctp_sf_do_unexpected_init( ...@@ -1555,7 +1551,7 @@ static sctp_disposition_t sctp_sf_do_unexpected_init(
* construct the parameters in INIT ACK by copying the * construct the parameters in INIT ACK by copying the
* ERROR causes over. * ERROR causes over.
*/ */
unk_param = (sctp_unrecognized_param_t *) unk_param = (struct sctp_unrecognized_param *)
((__u8 *)(err_chunk->chunk_hdr) + ((__u8 *)(err_chunk->chunk_hdr) +
sizeof(struct sctp_chunkhdr)); sizeof(struct sctp_chunkhdr));
/* Replace the cause code with the "Unrecognized parameter" /* Replace the cause code with the "Unrecognized parameter"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment