sctp: remove the typedef sctp_cookie_preserve_param_t
authorXin Long <lucien.xin@gmail.com>
Mon, 17 Jul 2017 03:29:51 +0000 (11:29 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Jul 2017 03:52:13 +0000 (20:52 -0700)
This patch is to remove the typedef sctp_cookie_preserve_param_t, and
replace with struct sctp_cookie_preserve_param in the places where it's
using this typedef.

It is also to fix some indents in sctp_sf_do_5_2_6_stale().

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/sctp.h
net/sctp/sm_statefuns.c

index 6b45c8a386425bbafee77c691ef5f289e2f241a1..d8f9d8f8649bddb2329669fa737865513f021b5d 100644 (file)
@@ -285,10 +285,10 @@ struct sctp_ipv6addr_param {
 };
 
 /* Section 3.3.2.1 Cookie Preservative (9) */
-typedef struct sctp_cookie_preserve_param {
+struct sctp_cookie_preserve_param {
        struct sctp_paramhdr param_hdr;
-       __be32          lifespan_increment;
-} sctp_cookie_preserve_param_t;
+       __be32 lifespan_increment;
+};
 
 /* Section 3.3.2.1 Host Name Address (11) */
 typedef struct sctp_hostname_param {
index b2a74c3823eea7e82a11d2812f0e235748274e7f..ae4c48c4f657dc9323fed2697f97a6a6eb73722d 100644 (file)
@@ -2336,13 +2336,12 @@ static sctp_disposition_t sctp_sf_do_5_2_6_stale(struct net *net,
                                                 void *arg,
                                                 sctp_cmd_seq_t *commands)
 {
-       struct sctp_chunk *chunk = arg;
-       u32 stale;
-       sctp_cookie_preserve_param_t bht;
-       sctp_errhdr_t *err;
-       struct sctp_chunk *reply;
-       struct sctp_bind_addr *bp;
        int attempts = asoc->init_err_counter + 1;
+       struct sctp_chunk *chunk = arg, *reply;
+       struct sctp_cookie_preserve_param bht;
+       struct sctp_bind_addr *bp;
+       sctp_errhdr_t *err;
+       u32 stale;
 
        if (attempts > asoc->max_init_attempts) {
                sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,