X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/7b5c3eb05efb0d67348c92d81da599c64e0c03db..a261989cda6f671352e6323f11d2d98e923c622e:/match.c diff --git a/match.c b/match.c index 7b0f6017..adc298e7 100644 --- a/match.c +++ b/match.c @@ -71,7 +71,7 @@ static void build_hash_table(struct sum_struct *s) if (!tag_table || !targets) out_of_memory("build_hash_table"); - for (i=0;icount;i++) { + for (i=0;i<(int) s->count;i++) { targets[i].i = i; targets[i].t = gettag(s->sums[i].sum1); } @@ -175,7 +175,7 @@ static void hash_search(int f,struct sum_struct *s, sum = (s1 & 0xffff) | (s2 << 16); tag_hits++; - for (; jcount && targets[j].t == t; j++) { + for (; j < (int) s->count && targets[j].t == t; j++) { int l, i = targets[j].i; if (sum != s->sums[i].sum1) continue; @@ -201,7 +201,7 @@ static void hash_search(int f,struct sum_struct *s, /* we've found a match, but now check to see if last_i can hint at a better match */ - for (j++; jcount && targets[j].t == t; j++) { + for (j++; j < (int) s->count && targets[j].t == t; j++) { int i2 = targets[j].i; if (i2 == last_i + 1) { if (sum != s->sums[i2].sum1) break;