1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-23 07:31:31 +00:00

Use [] instead of [0] for flexible arrays.

Obtained from: Bruce Cran
MFC after: 1 week
This commit is contained in:
Michael Tuexen 2010-01-22 07:53:41 +00:00
parent f5ec5ddec2
commit 663fdad84b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=202782
3 changed files with 19 additions and 19 deletions

View File

@ -60,7 +60,7 @@ typedef union sctp_hash_context {
typedef struct sctp_key { typedef struct sctp_key {
uint32_t keylen; uint32_t keylen;
uint8_t key[0]; uint8_t key[];
} sctp_key_t; } sctp_key_t;
typedef struct sctp_shared_key { typedef struct sctp_shared_key {
@ -83,7 +83,7 @@ typedef struct sctp_auth_chklist {
typedef struct sctp_hmaclist { typedef struct sctp_hmaclist {
uint16_t max_algo; /* max algorithms allocated */ uint16_t max_algo; /* max algorithms allocated */
uint16_t num_algo; /* num algorithms used */ uint16_t num_algo; /* num algorithms used */
uint16_t hmac[0]; uint16_t hmac[];
} sctp_hmaclist_t; } sctp_hmaclist_t;
/* authentication info */ /* authentication info */

View File

@ -138,7 +138,7 @@ struct sctp_asconf_addrv4_param { /* an ASCONF address (v4) parameter */
struct sctp_supported_chunk_types_param { struct sctp_supported_chunk_types_param {
struct sctp_paramhdr ph;/* type = 0x8008 len = x */ struct sctp_paramhdr ph;/* type = 0x8008 len = x */
uint8_t chunk_types[0]; uint8_t chunk_types[];
} SCTP_PACKED; } SCTP_PACKED;
@ -219,7 +219,7 @@ struct sctp_state_cookie { /* this is our definition... */
struct sctp_missing_nat_state { struct sctp_missing_nat_state {
uint16_t cause; uint16_t cause;
uint16_t length; uint16_t length;
uint8_t data[0]; uint8_t data[];
} SCTP_PACKED; } SCTP_PACKED;
@ -451,7 +451,7 @@ struct sctp_pktdrop_chunk {
uint32_t current_onq; uint32_t current_onq;
uint16_t trunc_len; uint16_t trunc_len;
uint16_t reserved; uint16_t reserved;
uint8_t data[0]; uint8_t data[];
} SCTP_PACKED; } SCTP_PACKED;
/**********STREAM RESET STUFF ******************/ /**********STREAM RESET STUFF ******************/
@ -461,13 +461,13 @@ struct sctp_stream_reset_out_request {
uint32_t request_seq; /* monotonically increasing seq no */ uint32_t request_seq; /* monotonically increasing seq no */
uint32_t response_seq; /* if a response, the resp seq no */ uint32_t response_seq; /* if a response, the resp seq no */
uint32_t send_reset_at_tsn; /* last TSN I assigned outbound */ uint32_t send_reset_at_tsn; /* last TSN I assigned outbound */
uint16_t list_of_streams[0]; /* if not all list of streams */ uint16_t list_of_streams[]; /* if not all list of streams */
} SCTP_PACKED; } SCTP_PACKED;
struct sctp_stream_reset_in_request { struct sctp_stream_reset_in_request {
struct sctp_paramhdr ph; struct sctp_paramhdr ph;
uint32_t request_seq; uint32_t request_seq;
uint16_t list_of_streams[0]; /* if not all list of streams */ uint16_t list_of_streams[]; /* if not all list of streams */
} SCTP_PACKED; } SCTP_PACKED;
@ -545,24 +545,24 @@ struct sctp_stream_reset_resp_tsn {
#define SCTP_RANDOM_MAX_SIZE 256 #define SCTP_RANDOM_MAX_SIZE 256
struct sctp_auth_random { struct sctp_auth_random {
struct sctp_paramhdr ph;/* type = 0x8002 */ struct sctp_paramhdr ph;/* type = 0x8002 */
uint8_t random_data[0]; uint8_t random_data[];
} SCTP_PACKED; } SCTP_PACKED;
struct sctp_auth_chunk_list { struct sctp_auth_chunk_list {
struct sctp_paramhdr ph;/* type = 0x8003 */ struct sctp_paramhdr ph;/* type = 0x8003 */
uint8_t chunk_types[0]; uint8_t chunk_types[];
} SCTP_PACKED; } SCTP_PACKED;
struct sctp_auth_hmac_algo { struct sctp_auth_hmac_algo {
struct sctp_paramhdr ph;/* type = 0x8004 */ struct sctp_paramhdr ph;/* type = 0x8004 */
uint16_t hmac_ids[0]; uint16_t hmac_ids[];
} SCTP_PACKED; } SCTP_PACKED;
struct sctp_auth_chunk { struct sctp_auth_chunk {
struct sctp_chunkhdr ch; struct sctp_chunkhdr ch;
uint16_t shared_key_id; uint16_t shared_key_id;
uint16_t hmac_id; uint16_t hmac_id;
uint8_t hmac[0]; uint8_t hmac[];
} SCTP_PACKED; } SCTP_PACKED;
struct sctp_auth_invalid_hmac { struct sctp_auth_invalid_hmac {

View File

@ -276,7 +276,7 @@ struct sctp_send_failed {
uint32_t ssf_error; uint32_t ssf_error;
struct sctp_sndrcvinfo ssf_info; struct sctp_sndrcvinfo ssf_info;
sctp_assoc_t ssf_assoc_id; sctp_assoc_t ssf_assoc_id;
uint8_t ssf_data[0]; uint8_t ssf_data[];
}; };
/* flag that indicates state of data */ /* flag that indicates state of data */
@ -370,7 +370,7 @@ struct sctp_stream_reset_event {
uint16_t strreset_flags; uint16_t strreset_flags;
uint32_t strreset_length; uint32_t strreset_length;
sctp_assoc_t strreset_assoc_id; sctp_assoc_t strreset_assoc_id;
uint16_t strreset_list[0]; uint16_t strreset_list[];
}; };
/* flags in strreset_flags field */ /* flags in strreset_flags field */
@ -517,13 +517,13 @@ struct sctp_authchunk {
struct sctp_authkey { struct sctp_authkey {
sctp_assoc_t sca_assoc_id; sctp_assoc_t sca_assoc_id;
uint16_t sca_keynumber; uint16_t sca_keynumber;
uint8_t sca_key[0]; uint8_t sca_key[];
}; };
/* SCTP_HMAC_IDENT */ /* SCTP_HMAC_IDENT */
struct sctp_hmacalgo { struct sctp_hmacalgo {
uint32_t shmac_number_of_idents; uint32_t shmac_number_of_idents;
uint16_t shmac_idents[0]; uint16_t shmac_idents[];
}; };
/* AUTH hmac_id */ /* AUTH hmac_id */
@ -544,7 +544,7 @@ struct sctp_authkeyid {
/* SCTP_PEER_AUTH_CHUNKS / SCTP_LOCAL_AUTH_CHUNKS */ /* SCTP_PEER_AUTH_CHUNKS / SCTP_LOCAL_AUTH_CHUNKS */
struct sctp_authchunks { struct sctp_authchunks {
sctp_assoc_t gauth_assoc_id; sctp_assoc_t gauth_assoc_id;
uint8_t gauth_chunks[0]; uint8_t gauth_chunks[];
}; };
struct sctp_assoc_value { struct sctp_assoc_value {
@ -554,7 +554,7 @@ struct sctp_assoc_value {
struct sctp_assoc_ids { struct sctp_assoc_ids {
uint32_t gaids_number_of_ids; uint32_t gaids_number_of_ids;
sctp_assoc_t gaids_assoc_id[0]; sctp_assoc_t gaids_assoc_id[];
}; };
struct sctp_sack_info { struct sctp_sack_info {
@ -603,7 +603,7 @@ struct sctp_stream_reset {
sctp_assoc_t strrst_assoc_id; sctp_assoc_t strrst_assoc_id;
uint16_t strrst_flags; uint16_t strrst_flags;
uint16_t strrst_num_streams; /* 0 == ALL */ uint16_t strrst_num_streams; /* 0 == ALL */
uint16_t strrst_list[0];/* list if strrst_num_streams is not 0 */ uint16_t strrst_list[]; /* list if strrst_num_streams is not 0 */
}; };
@ -756,7 +756,7 @@ struct sctp_cwnd_log_req {
int32_t num_ret; /* Number returned */ int32_t num_ret; /* Number returned */
int32_t start_at; /* start at this one */ int32_t start_at; /* start at this one */
int32_t end_at; /* end at this one */ int32_t end_at; /* end at this one */
struct sctp_cwnd_log log[0]; struct sctp_cwnd_log log[];
}; };
struct sctp_timeval { struct sctp_timeval {