Use variable-sized arrays where appropriate.

This commit is contained in:
Ruslan Ermilov 2005-10-28 14:41:28 +00:00
parent c2888a85bc
commit d56ace0997
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=151800
5 changed files with 7 additions and 7 deletions

View File

@ -130,7 +130,7 @@ struct ng_bridge_host {
/* Structure returned by NGM_BRIDGE_GET_TABLE */
struct ng_bridge_host_ary {
u_int32_t numHosts;
struct ng_bridge_host hosts[0];
struct ng_bridge_host hosts[];
};
/* Keep this in sync with the above structure definition */

View File

@ -54,7 +54,7 @@
struct ng_ksocket_sockopt {
int32_t level; /* second arg of [gs]etsockopt() */
int32_t name; /* third arg of [gs]etsockopt() */
u_char value[0]; /* fourth arg of [gs]etsockopt() */
u_char value[]; /* fourth arg of [gs]etsockopt() */
};
/* Max length socket option we can return via NGM_KSOCKET_GETOPT

View File

@ -104,7 +104,7 @@
int bar; 00 00 00 00
char label[8]; 61 62 63 0a 00 00 00 00
u_char alen; 03 00
short ary[0]; 05 00 00 00 0a 00
short ary[]; 05 00 00 00 0a 00
};
ASCII value

View File

@ -124,7 +124,7 @@ struct ngpppoestat {
struct ngpppoe_init_data {
char hook[NG_HOOKSIZ]; /* hook to monitor on */
u_int16_t data_len; /* Length of the service name */
char data[0]; /* init data goes here */
char data[]; /* init data goes here */
};
/* Keep this in sync with the above structure definition */
@ -203,7 +203,7 @@ struct ngpppoe_sts {
struct pppoe_tag {
u_int16_t tag_type;
u_int16_t tag_len;
char tag_data[0];
char tag_data[];
}__packed;
struct pppoe_hdr{
@ -212,7 +212,7 @@ struct pppoe_hdr{
u_int8_t code;
u_int16_t sid;
u_int16_t length;
struct pppoe_tag tag[0];
struct pppoe_tag tag[];
}__packed;

View File

@ -62,7 +62,7 @@ struct ng_vlan_filter {
/* Structure returned by NGM_VLAN_GET_TABLE. */
struct ng_vlan_table {
u_int32_t n;
struct ng_vlan_filter filter[0];
struct ng_vlan_filter filter[];
};
/* Keep this in sync with the above structure definition. */