@matheusbsbs / matheus-bagliano / commits / 63f175693e
Fork 0

Initialize FAMs using `FLEX_ARRAY'.

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 <octo@verplant.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Florian Forster committed Jun 18, 2006 at 17:18 UTC 63f175693e46c8e1562e68a40086ec864f43886b
1 file changed +2 -1
diff-delta.c
+2 -1
@@ -22,6 +22,7 @@
22 #include <string.h>
23 #include "delta.h"
24
25 +#include "git-compat-util.h"
26
27 /* maximum hash entry list for the same hash bucket */
28 #define HASH_LIMIT 64
@@ -131,7 +132,7 @@ struct delta_index {
132 const void *src_buf;
133 unsigned long src_size;
134 unsigned int hash_mask;
134 - struct index_entry *hash[0];
135 + struct index_entry *hash[FLEX_ARRAY];
136 };
137
138 struct delta_index * create_delta_index(const void *buf, unsigned long bufsize)