summaryrefslogtreecommitdiff
path: root/exclude.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2008-09-01 19:01:48 -0700
committerWayne Davison <wayned@samba.org>2008-09-01 19:01:48 -0700
commit2a147e9fcb6ed2caf2fd04f1713249cb17ad2b1f (patch)
treeaa796d41a6e49308095d73c0795aeddae7ed2da1 /exclude.c
parent7634fc8eb613eec2950ad957dc638c920927ca1e (diff)
downloadrsync-2a147e9fcb6ed2caf2fd04f1713249cb17ad2b1f.tar.gz
Don't define an array with no size.
Diffstat (limited to 'exclude.c')
-rw-r--r--exclude.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/exclude.c b/exclude.c
index c0dc3bd3..d449144a 100644
--- a/exclude.c
+++ b/exclude.c
@@ -480,7 +480,7 @@ static BOOL setup_merge_file(int mergelist_num, struct filter_struct *ex,
struct local_filter_state {
int mergelist_cnt;
- struct filter_list_struct mergelists[0];
+ struct filter_list_struct mergelists[1];
};
/* Each time rsync changes to a new directory it call this function to
@@ -505,7 +505,7 @@ void *push_local_filters(const char *dir, unsigned int dirlen)
push = (struct local_filter_state *)new_array(char,
sizeof (struct local_filter_state)
- + mergelist_cnt * sizeof (struct filter_list_struct));
+ + (mergelist_cnt-1) * sizeof (struct filter_list_struct));
if (!push)
out_of_memory("push_local_filters");