net/netfilter: fix visual studio Compiler Error C2229
D:\archer\code\nuttx\include\nuttx/net/netfilter/x_tables.h(71,7): error C2229: type 'struct xt_standard_target' has an illegal zero-sized array Compiler error C2229: A member of a structure or bit field contains a zero-sized array that is not the last member. Reference: https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2229?view=msvc-170 Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
parent
ccaa625930
commit
5580de0685
@ -117,7 +117,7 @@ struct ipt_entry
|
||||
|
||||
struct xt_counters counters; /* Packet and byte counters. */
|
||||
|
||||
unsigned char elems[0]; /* The matches (if any), then the target. */
|
||||
unsigned char elems[1]; /* The matches (if any), then the target. */
|
||||
};
|
||||
|
||||
/* Note 1: How entries are organized in following interface arguments.
|
||||
|
@ -62,7 +62,7 @@ struct xt_entry_target
|
||||
uint16_t target_size; /* Total length */
|
||||
} u;
|
||||
|
||||
unsigned char data[0];
|
||||
unsigned char data[1];
|
||||
};
|
||||
|
||||
struct xt_standard_target
|
||||
|
Loading…
Reference in New Issue
Block a user