- rprintf(FINFO,"offset=%d sum=%08x\n",(int)offset,sum);
-
- if (j == NULL_TAG) {
- goto null_tag;
- }
+ rprintf(FINFO,"offset=%.0f sum=%08x\n",(double)offset,sum);
+
+ i = sum_table[GETTAG(sum)];
+ if (i < 0)
+ goto null_hash;
+
+ hash_hits++;
+ do {
+ int32 l;
+
+ if (sum != s->sums[i].sum1)
+ continue;
+
+ /* also make sure the two blocks are the same length */
+ l = (int32)MIN((OFF_T)s->blength, len-offset);
+ if (l != s->sums[i].len)
+ continue;
+
+ /* in-place: ensure chunk's offset is either >= our
+ * offset or that the data didn't move. */
+ if (updating_basis_file && s->sums[i].offset < offset
+ && !(s->sums[i].flags & SUMFLG_SAME_OFFSET))
+ continue;
+
+ if (verbose > 3) {
+ rprintf(FINFO,
+ "potential match at %.0f i=%ld sum=%08x\n",
+ (double)offset, (long)i, sum);
+ }