Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jan 2010 07:53:41 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r202782 - head/sys/netinet
Message-ID:  <201001220753.o0M7rfX9094706@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Fri Jan 22 07:53:41 2010
New Revision: 202782
URL: http://svn.freebsd.org/changeset/base/202782

Log:
  Use [] instead of [0] for flexible arrays.
  
  Obtained from: Bruce Cran
  MFC after: 1 week

Modified:
  head/sys/netinet/sctp_auth.h
  head/sys/netinet/sctp_header.h
  head/sys/netinet/sctp_uio.h

Modified: head/sys/netinet/sctp_auth.h
==============================================================================
--- head/sys/netinet/sctp_auth.h	Fri Jan 22 07:22:46 2010	(r202781)
+++ head/sys/netinet/sctp_auth.h	Fri Jan 22 07:53:41 2010	(r202782)
@@ -60,7 +60,7 @@ typedef union sctp_hash_context {
 
 typedef struct sctp_key {
 	uint32_t keylen;
-	uint8_t key[0];
+	uint8_t key[];
 }        sctp_key_t;
 
 typedef struct sctp_shared_key {
@@ -83,7 +83,7 @@ typedef struct sctp_auth_chklist {
 typedef struct sctp_hmaclist {
 	uint16_t max_algo;	/* max algorithms allocated */
 	uint16_t num_algo;	/* num algorithms used */
-	uint16_t hmac[0];
+	uint16_t hmac[];
 }             sctp_hmaclist_t;
 
 /* authentication info */

Modified: head/sys/netinet/sctp_header.h
==============================================================================
--- head/sys/netinet/sctp_header.h	Fri Jan 22 07:22:46 2010	(r202781)
+++ head/sys/netinet/sctp_header.h	Fri Jan 22 07:53:41 2010	(r202782)
@@ -138,7 +138,7 @@ struct sctp_asconf_addrv4_param {	/* an 
 
 struct sctp_supported_chunk_types_param {
 	struct sctp_paramhdr ph;/* type = 0x8008  len = x */
-	uint8_t chunk_types[0];
+	uint8_t chunk_types[];
 }                                SCTP_PACKED;
 
 
@@ -219,7 +219,7 @@ struct sctp_state_cookie {	/* this is ou
 struct sctp_missing_nat_state {
 	uint16_t cause;
 	uint16_t length;
-	uint8_t data[0];
+	uint8_t data[];
 }                      SCTP_PACKED;
 
 
@@ -451,7 +451,7 @@ struct sctp_pktdrop_chunk {
 	uint32_t current_onq;
 	uint16_t trunc_len;
 	uint16_t reserved;
-	uint8_t data[0];
+	uint8_t data[];
 }                  SCTP_PACKED;
 
 /**********STREAM RESET STUFF ******************/
@@ -461,13 +461,13 @@ struct sctp_stream_reset_out_request {
 	uint32_t request_seq;	/* monotonically increasing seq no */
 	uint32_t response_seq;	/* if a response, the resp seq no */
 	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;
 
 struct sctp_stream_reset_in_request {
 	struct sctp_paramhdr ph;
 	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;
 
 
@@ -545,24 +545,24 @@ struct sctp_stream_reset_resp_tsn {
 #define SCTP_RANDOM_MAX_SIZE 256
 struct sctp_auth_random {
 	struct sctp_paramhdr ph;/* type = 0x8002 */
-	uint8_t random_data[0];
+	uint8_t random_data[];
 }                SCTP_PACKED;
 
 struct sctp_auth_chunk_list {
 	struct sctp_paramhdr ph;/* type = 0x8003 */
-	uint8_t chunk_types[0];
+	uint8_t chunk_types[];
 }                    SCTP_PACKED;
 
 struct sctp_auth_hmac_algo {
 	struct sctp_paramhdr ph;/* type = 0x8004 */
-	uint16_t hmac_ids[0];
+	uint16_t hmac_ids[];
 }                   SCTP_PACKED;
 
 struct sctp_auth_chunk {
 	struct sctp_chunkhdr ch;
 	uint16_t shared_key_id;
 	uint16_t hmac_id;
-	uint8_t hmac[0];
+	uint8_t hmac[];
 }               SCTP_PACKED;
 
 struct sctp_auth_invalid_hmac {

Modified: head/sys/netinet/sctp_uio.h
==============================================================================
--- head/sys/netinet/sctp_uio.h	Fri Jan 22 07:22:46 2010	(r202781)
+++ head/sys/netinet/sctp_uio.h	Fri Jan 22 07:53:41 2010	(r202782)
@@ -276,7 +276,7 @@ struct sctp_send_failed {
 	uint32_t ssf_error;
 	struct sctp_sndrcvinfo ssf_info;
 	sctp_assoc_t ssf_assoc_id;
-	uint8_t ssf_data[0];
+	uint8_t ssf_data[];
 };
 
 /* flag that indicates state of data */
@@ -370,7 +370,7 @@ struct sctp_stream_reset_event {
 	uint16_t strreset_flags;
 	uint32_t strreset_length;
 	sctp_assoc_t strreset_assoc_id;
-	uint16_t strreset_list[0];
+	uint16_t strreset_list[];
 };
 
 /* flags in strreset_flags field */
@@ -517,13 +517,13 @@ struct sctp_authchunk {
 struct sctp_authkey {
 	sctp_assoc_t sca_assoc_id;
 	uint16_t sca_keynumber;
-	uint8_t sca_key[0];
+	uint8_t sca_key[];
 };
 
 /* SCTP_HMAC_IDENT */
 struct sctp_hmacalgo {
 	uint32_t shmac_number_of_idents;
-	uint16_t shmac_idents[0];
+	uint16_t shmac_idents[];
 };
 
 /* AUTH hmac_id */
@@ -544,7 +544,7 @@ struct sctp_authkeyid {
 /* SCTP_PEER_AUTH_CHUNKS / SCTP_LOCAL_AUTH_CHUNKS */
 struct sctp_authchunks {
 	sctp_assoc_t gauth_assoc_id;
-	uint8_t gauth_chunks[0];
+	uint8_t gauth_chunks[];
 };
 
 struct sctp_assoc_value {
@@ -554,7 +554,7 @@ struct sctp_assoc_value {
 
 struct sctp_assoc_ids {
 	uint32_t gaids_number_of_ids;
-	sctp_assoc_t gaids_assoc_id[0];
+	sctp_assoc_t gaids_assoc_id[];
 };
 
 struct sctp_sack_info {
@@ -603,7 +603,7 @@ struct sctp_stream_reset {
 	sctp_assoc_t strrst_assoc_id;
 	uint16_t strrst_flags;
 	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 start_at;	/* start 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 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001220753.o0M7rfX9094706>