X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/c95dcb3935ec8959385fdc5b5837d23b305b3bd5..5e7dbaca50e00e6f418a4e8ae6ccfcf4ccb926f8:/match.c diff --git a/match.c b/match.c index 926aad61..dd5ac47a 100644 --- a/match.c +++ b/match.c @@ -62,9 +62,9 @@ static void build_hash_table(struct sum_struct *s) int i; if (!tag_table) - tag_table = (int *)malloc(sizeof(tag_table[0])*TABLESIZE); + tag_table = new_array(int, TABLESIZE); - targets = (struct target *)malloc(sizeof(targets[0])*s->count); + targets = new_array(struct target, s->count); if (!tag_table || !targets) out_of_memory("build_hash_table"); @@ -284,7 +284,7 @@ static void hash_search(int f,struct sum_struct *s, void match_sums(int f, struct sum_struct *s, struct map_struct *buf, OFF_T len) { char file_sum[MD4_SUM_LENGTH]; - extern int write_batch; /* dw */ + extern int write_batch; last_match = 0; false_alarms = 0; @@ -319,7 +319,7 @@ void match_sums(int f, struct sum_struct *s, struct map_struct *buf, OFF_T len) if (verbose > 2) rprintf(FINFO,"sending file_sum\n"); write_buf(f,file_sum,MD4_SUM_LENGTH); - if (write_batch) /* dw */ + if (write_batch) write_batch_delta_file(file_sum, MD4_SUM_LENGTH); if (targets) {