no longer use mmap() in rsync because of the risk of a SIGBUS when
[rsync/rsync.git] / match.c
diff --git a/match.c b/match.c
index f54c229..29b5251 100644 (file)
--- a/match.c
+++ b/match.c
@@ -94,7 +94,7 @@ static void matched(int f,struct sum_struct *s,struct map_struct *buf,
                    OFF_T offset,int i)
 {
        OFF_T n = offset - last_match;
-       int j;
+       OFF_T j;
 
        if (verbose > 2 && i >= 0)
                rprintf(FINFO,"match at %d last_match=%d j=%d len=%d n=%d\n",
@@ -119,7 +119,8 @@ static void matched(int f,struct sum_struct *s,struct map_struct *buf,
        else
                last_match = offset;
 
-       show_progress(last_match, buf->size);
+       if (buf)
+               show_progress(last_match, buf->file_size);
 
        if (i == -1) end_progress();
 }