From: Florian Forster Date: Sun, 18 Jun 2006 15:18:04 +0000 (+0200) Subject: Initialize FAMs using `FLEX_ARRAY'. X-Git-Tag: v1.4.1-rc1~7^2~5 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=63f175693e46c8e1562e68a40086ec864f43886b;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/diff-delta.c b/diff-delta.c index 25a798d05..74486b1b8 100644 --- a/diff-delta.c +++ b/diff-delta.c @@ -22,6 +22,7 @@ #include #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)