X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/900cfcb584e878c9600827b7e0ad7160e1018b48..fbbe9a016df450797a787dee2849e7d9d9238eed:/match.c diff --git a/match.c b/match.c index ee49a0ef..89ba7304 100644 --- a/match.c +++ b/match.c @@ -40,7 +40,7 @@ extern struct stats stats; static uint32 tablesize; static int32 *sum_table; -#define GETTAG(sum) ((sum)%tablesize) +#define SUM2HASH(sum) ((sum)%tablesize) static void build_hash_table(struct sum_struct *s) { @@ -63,7 +63,7 @@ static void build_hash_table(struct sum_struct *s) memset(sum_table, 0xFF, tablesize * sizeof sum_table[0]); for (i = 0; i < s->count; i++) { - uint32 t = GETTAG(s->sums[i].sum1); + uint32 t = SUM2HASH(s->sums[i].sum1); s->sums[i].chain = sum_table[t]; sum_table[t] = i; } @@ -162,13 +162,11 @@ static void hash_search(int f,struct sum_struct *s, do { int done_csum2 = 0; int32 i; - uint32 t; if (verbose > 4) rprintf(FINFO,"offset=%.0f sum=%08x\n",(double)offset,sum); - t = GETTAG(sum); - i = sum_table[t]; + i = sum_table[SUM2HASH(sum)]; if (i < 0) goto null_hash;