Commit e1f19c7b authored by David Rientjes's avatar David Rientjes Committed by James Toy

The `parts' member of struct flex_array should evaluate to an incomplete

type so that sizeof() cannot be used and C99 does not require the
zero-length specification.
Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
Acked-by: default avatarDave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 386abe67
...@@ -21,7 +21,7 @@ struct flex_array { ...@@ -21,7 +21,7 @@ struct flex_array {
struct { struct {
int element_size; int element_size;
int total_nr_elements; int total_nr_elements;
struct flex_array_part *parts[0]; struct flex_array_part *parts[];
}; };
/* /*
* This little trick makes sure that * This little trick makes sure that
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment