X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/0b91056090d768c4bdc6aa83d929d09416d34e89..0d0e2e93e81a650898c1a5b332cef6db90f2dece:/match.c diff --git a/match.c b/match.c index 86f4b3ee..16779007 100644 --- a/match.c +++ b/match.c @@ -36,10 +36,10 @@ static int tag_hits; static int matches; static int data_transfer; -static int total_false_alarms=0; -static int total_tag_hits=0; -static int total_matches=0; -static int total_data_transfer=0; +static int total_false_alarms; +static int total_tag_hits; +static int total_matches; +static off_t total_data_transfer; struct target { @@ -47,9 +47,9 @@ struct target { int i; }; -static struct target *targets=NULL; +static struct target *targets; -static tag *tag_table = NULL; +static tag *tag_table; #define gettag2(s1,s2) (((s1) + (s2)) & 0xFFFF) #define gettag(sum) gettag2((sum)&0xFFFF,(sum)>>16) @@ -96,7 +96,7 @@ static void matched(int f,struct sum_struct *s,struct map_struct *buf, off_t n = offset - last_match; int j; - if (verbose > 2 && i != -1) + if (verbose > 2 && i >= 0) fprintf(FERROR,"match at %d last_match=%d j=%d len=%d n=%d\n", (int)offset,(int)last_match,i,(int)s->sums[i].len,(int)n); @@ -106,7 +106,7 @@ static void matched(int f,struct sum_struct *s,struct map_struct *buf, if (n > 0) write_flush(f); - if (i != -1) + if (i >= 0) n += s->sums[i].len; for (j=0;j= 0) last_match = offset + s->sums[i].len; + else + last_match = offset; } @@ -273,7 +275,7 @@ void match_report(void) return; fprintf(FINFO, - "total: matches=%d tag_hits=%d false_alarms=%d data=%d\n", + "total: matches=%d tag_hits=%d false_alarms=%d data=%ld\n", total_matches,total_tag_hits, - total_false_alarms,total_data_transfer); + total_false_alarms,(long)total_data_transfer); }