- targets = new_array(struct target, s->count);
- if (!tag_table || !targets)
- out_of_memory("build_hash_table");
-+ memset(sum_table, 0xFF, tablesize * sizeof (sum_table[0]));
++ memset(sum_table, 0xFF, tablesize * sizeof sum_table[0]);
for (i = 0; i < s->count; i++) {
- targets[i].i = i;
if (sum != s->sums[i].sum1)
continue;
-@@ -205,9 +187,10 @@ static void hash_search(int f,struct sum
+@@ -205,9 +187,11 @@ static void hash_search(int f,struct sum
&& !(s->sums[i].flags & SUMFLG_SAME_OFFSET))
continue;
- rprintf(FINFO,"potential match at %.0f target=%.0f %.0f sum=%08x\n",
- (double)offset,(double)j,(double)i,sum);
+ if (verbose > 3) {
-+ rprintf(FINFO,"potential match at %.0f i=%ld sum=%08x\n",
++ rprintf(FINFO,
++ "potential match at %.0f i=%ld sum=%08x\n",
+ (double)offset, (long)i, sum);
+ }
if (!done_csum2) {
map = (schar *)map_ptr(buf,offset,l);
-@@ -224,23 +207,23 @@ static void hash_search(int f,struct sum
+@@ -224,8 +208,8 @@ static void hash_search(int f,struct sum
* one with an identical offset, so we prefer that over
* the following want_i optimization. */
if (updating_basis_file) {
if (s->sums[i2].offset != offset)
continue;
if (i2 != i) {
- if (sum != s->sums[i2].sum1)
-- break;
-+ continue;
- if (memcmp(sum2, s->sums[i2].sum2,
- s->s2length) != 0)
-- break;
-+ continue;
- i = i2;
- }
- /* This chunk was at the same offset on
+@@ -240,7 +224,7 @@ static void hash_search(int f,struct sum
* both the sender and the receiver. */
s->sums[i].flags |= SUMFLG_SAME_OFFSET;
goto set_want_i;
}
/* we've found a match, but now check to see
-@@ -266,9 +249,8 @@ static void hash_search(int f,struct sum
+@@ -266,9 +250,8 @@ static void hash_search(int f,struct sum
s2 = sum >> 16;
matches++;
break;
backup = offset - last_match;
/* We sometimes read 1 byte prior to last_match... */
if (backup < 0)
-@@ -375,11 +357,6 @@ void match_sums(int f, struct sum_struct
+@@ -375,11 +358,6 @@ void match_sums(int f, struct sum_struct
rprintf(FINFO,"sending file_sum\n");
write_buf(f,file_sum,MD4_SUM_LENGTH);