summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_parse.h
diff options
context:
space:
mode:
authorarchie <archie@FreeBSD.org>2002-05-31 23:48:03 +0000
committerarchie <archie@FreeBSD.org>2002-05-31 23:48:03 +0000
commitb10887dc2b5e16221d7f03cd5ac6ef4fb431be07 (patch)
treea3614f18ebb460f641055c46c1ae4703125a0458 /sys/netgraph/ng_parse.h
parent5f569c908a7d63a3364c4e60c565498bceb4ff53 (diff)
downloadFreeBSD-src-b10887dc2b5e16221d7f03cd5ac6ef4fb431be07.zip
FreeBSD-src-b10887dc2b5e16221d7f03cd5ac6ef4fb431be07.tar.gz
Fix GCC warnings caused by initializing a zero length array. In the process,
simply things a bit by getting rid of 'struct ng_parse_struct_info' which was useless because it only contained one field. MFC after: 2 weeks
Diffstat (limited to 'sys/netgraph/ng_parse.h')
-rw-r--r--sys/netgraph/ng_parse.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/sys/netgraph/ng_parse.h b/sys/netgraph/ng_parse.h
index 13aa294..44cf437 100644
--- a/sys/netgraph/ng_parse.h
+++ b/sys/netgraph/ng_parse.h
@@ -162,15 +162,13 @@
};
// Super-type info for struct foo
- struct ng_parse_struct_info foo_fields = {
- {
+ struct ng_parse_struct_field foo_fields[] = {
{ "ip", &ng_parse_ipaddr_type },
{ "bar", &ng_parse_int32_type },
{ "label", &foo_label_type },
{ "alen", &ng_parse_uint8_type },
{ "ary", &foo_ary_type },
{ NULL }
- }
};
// Parse type for struct foo
@@ -300,7 +298,7 @@ struct ng_parse_type {
* field order, no matter what order they are listed in the ASCII string.
*
* Default value: Determined on a per-field basis
- * Additional info: struct ng_parse_struct_info *
+ * Additional info: struct ng_parse_struct_field *
*/
extern const struct ng_parse_type ng_parse_struct_type;
@@ -308,13 +306,10 @@ extern const struct ng_parse_type ng_parse_struct_type;
override is non-zero, the alignment is determined from the field type.
Note: add an extra struct ng_parse_struct_field with name == NULL
to indicate the end of the list. */
-struct ng_parse_struct_info {
- struct ng_parse_struct_field {
- const char *name; /* field name */
- const struct ng_parse_type
- *type; /* field type */
- int alignment; /* override alignment */
- } fields[0];
+struct ng_parse_struct_field {
+ const char *name; /* field name */
+ const struct ng_parse_type *type; /* field type */
+ int alignment; /* override alignment */
};
/*
OpenPOWER on IntegriCloud