Skip to content

Commit

Permalink
Initialize FAMs using `FLEX_ARRAY'.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Florian Forster authored and Junio C Hamano committed Jun 19, 2006
1 parent cfd432e commit 63f1756
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion diff-delta.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <string.h>
#include "delta.h"

#include "git-compat-util.h"

/* maximum hash entry list for the same hash bucket */
#define HASH_LIMIT 64
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 63f1756

Please sign in to comment.