Use variable-sized arrays where appropriate.
This commit is contained in:
parent
c2888a85bc
commit
d56ace0997
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=151800
@ -130,7 +130,7 @@ struct ng_bridge_host {
|
|||||||
/* Structure returned by NGM_BRIDGE_GET_TABLE */
|
/* Structure returned by NGM_BRIDGE_GET_TABLE */
|
||||||
struct ng_bridge_host_ary {
|
struct ng_bridge_host_ary {
|
||||||
u_int32_t numHosts;
|
u_int32_t numHosts;
|
||||||
struct ng_bridge_host hosts[0];
|
struct ng_bridge_host hosts[];
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Keep this in sync with the above structure definition */
|
/* Keep this in sync with the above structure definition */
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
struct ng_ksocket_sockopt {
|
struct ng_ksocket_sockopt {
|
||||||
int32_t level; /* second arg of [gs]etsockopt() */
|
int32_t level; /* second arg of [gs]etsockopt() */
|
||||||
int32_t name; /* third 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
|
/* Max length socket option we can return via NGM_KSOCKET_GETOPT
|
||||||
|
@ -104,7 +104,7 @@
|
|||||||
int bar; 00 00 00 00
|
int bar; 00 00 00 00
|
||||||
char label[8]; 61 62 63 0a 00 00 00 00
|
char label[8]; 61 62 63 0a 00 00 00 00
|
||||||
u_char alen; 03 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
|
ASCII value
|
||||||
|
@ -124,7 +124,7 @@ struct ngpppoestat {
|
|||||||
struct ngpppoe_init_data {
|
struct ngpppoe_init_data {
|
||||||
char hook[NG_HOOKSIZ]; /* hook to monitor on */
|
char hook[NG_HOOKSIZ]; /* hook to monitor on */
|
||||||
u_int16_t data_len; /* Length of the service name */
|
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 */
|
/* Keep this in sync with the above structure definition */
|
||||||
@ -203,7 +203,7 @@ struct ngpppoe_sts {
|
|||||||
struct pppoe_tag {
|
struct pppoe_tag {
|
||||||
u_int16_t tag_type;
|
u_int16_t tag_type;
|
||||||
u_int16_t tag_len;
|
u_int16_t tag_len;
|
||||||
char tag_data[0];
|
char tag_data[];
|
||||||
}__packed;
|
}__packed;
|
||||||
|
|
||||||
struct pppoe_hdr{
|
struct pppoe_hdr{
|
||||||
@ -212,7 +212,7 @@ struct pppoe_hdr{
|
|||||||
u_int8_t code;
|
u_int8_t code;
|
||||||
u_int16_t sid;
|
u_int16_t sid;
|
||||||
u_int16_t length;
|
u_int16_t length;
|
||||||
struct pppoe_tag tag[0];
|
struct pppoe_tag tag[];
|
||||||
}__packed;
|
}__packed;
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ struct ng_vlan_filter {
|
|||||||
/* Structure returned by NGM_VLAN_GET_TABLE. */
|
/* Structure returned by NGM_VLAN_GET_TABLE. */
|
||||||
struct ng_vlan_table {
|
struct ng_vlan_table {
|
||||||
u_int32_t n;
|
u_int32_t n;
|
||||||
struct ng_vlan_filter filter[0];
|
struct ng_vlan_filter filter[];
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Keep this in sync with the above structure definition. */
|
/* Keep this in sync with the above structure definition. */
|
||||||
|
Loading…
Reference in New Issue
Block a user