Thread (17 messages) flat view 17 messages, 5 authors, 2016-06-15
DORMANTno replies

[PATCH 2/7] Initialize FAMs using `FLEX_ARRAY'.

From: Florian Forster <hidden>
Date: 2016-06-15 22:42:30
Subsystem: the rest · Maintainer: Linus Torvalds

When initializing a `flexible array member' the macro `FLEX_ARRAY' should be
used. This was forgotten in `diff-delta.c'.

Signed-off-by: Florian Forster <redacted>


---

 diff-delta.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

e587fd59510f2ed8326d280054d78cfb78d482dc
diff --git a/diff-delta.c b/diff-delta.c
index 25a798d..74486b1 100644
--- a/diff-delta.c
+++ b/diff-delta.c
@@ -22,6 +22,7 @@ #include <stdlib.h>
 #include <string.h>
 #include "delta.h"
 
+#include "git-compat-util.h"
 
 /* maximum hash entry list for the same hash bucket */
 #define HASH_LIMIT 64
@@ -131,7 +132,7 @@ struct delta_index {
 	const void *src_buf;
 	unsigned long src_size;
 	unsigned int hash_mask;
-	struct index_entry *hash[0];
+	struct index_entry *hash[FLEX_ARRAY];
 };
 
 struct delta_index * create_delta_index(const void *buf, unsigned long bufsize)
-- 
1.3.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help