aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2009-08-26 17:29:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-08-26 23:06:52 -0400
commit8e7ee27095aee87b5db1b0061e2ceea5878a1bbd (patch)
tree8b4ce6b0597658deee6c968ed27663b097dca6b5
parent105b6e8a74cac11cdf70903877593c7f202075cc (diff)
flex_array: declare parts member to have incomplete type
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: David Rientjes <rientjes@google.com> Acked-by: Dave Hansen <dave@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/flex_array.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/flex_array.h b/include/linux/flex_array.h
index 23c1ec79a31b..603160db7c98 100644
--- a/include/linux/flex_array.h
+++ b/include/linux/flex_array.h
@@ -21,7 +21,7 @@ struct flex_array {
21 struct { 21 struct {
22 int element_size; 22 int element_size;
23 int total_nr_elements; 23 int total_nr_elements;
24 struct flex_array_part *parts[0]; 24 struct flex_array_part *parts[];
25 }; 25 };
26 /* 26 /*
27 * This little trick makes sure that 27 * This little trick makes sure that