aboutsummaryrefslogtreecommitdiffstats
path: root/batch.c
diff options
context:
space:
mode:
authorJ.W. Schultz <jw@samba.org>2004-02-06 10:00:33 +0000
committerJ.W. Schultz <jw@samba.org>2004-02-06 10:00:33 +0000
commita85906c75683de95a8a999552822fd86870ab2b7 (patch)
tree7e2b9fb7a8bff4835d9befcf61b850bf7ea336a1 /batch.c
parent8aa81e06e644bb1632e07e041e409c7149fd13d5 (diff)
downloadandroid_external_rsync-a85906c75683de95a8a999552822fd86870ab2b7.tar.gz
android_external_rsync-a85906c75683de95a8a999552822fd86870ab2b7.tar.bz2
android_external_rsync-a85906c75683de95a8a999552822fd86870ab2b7.zip
Start flist with a more reasonable size, grow it linearly
once it reaches a largish size (16 million files) and make it actually match the comments so it may be used to initialize flists of known size (create_flist_from_batch()).
Diffstat (limited to 'batch.c')
-rw-r--r--batch.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/batch.c b/batch.c
index aa601306..d90c87b9 100644
--- a/batch.c
+++ b/batch.c
@@ -144,11 +144,8 @@ struct file_list *create_flist_from_batch(void)
save_pv = protocol_version;
protocol_version = read_int(f);
- batch_flist->count = batch_flist->malloced = read_int(f);
- batch_flist->files = new_array(struct file_struct *,
- batch_flist->malloced);
- if (!batch_flist->files)
- out_of_memory("create_flist_from_batch");
+ batch_flist->count = read_int(f);
+ flist_expand(batch_flist);
for (i = 0; (flags = read_byte(f)) != 0; i++) {
if (protocol_version >= 28 && (flags & XMIT_EXTENDED_FLAGS))