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>
This commit is contained in:
Florian Forster 2006-06-18 17:18:04 +02:00 committed by Junio C Hamano
parent cfd432e63d
commit 63f175693e

View file

@ -22,6 +22,7 @@
#include <string.h> #include <string.h>
#include "delta.h" #include "delta.h"
#include "git-compat-util.h"
/* maximum hash entry list for the same hash bucket */ /* maximum hash entry list for the same hash bucket */
#define HASH_LIMIT 64 #define HASH_LIMIT 64
@ -131,7 +132,7 @@ struct delta_index {
const void *src_buf; const void *src_buf;
unsigned long src_size; unsigned long src_size;
unsigned int hash_mask; 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) struct delta_index * create_delta_index(const void *buf, unsigned long bufsize)