Removing vestigial support for protocol versions prior to 15.
[rsync/rsync.git] / match.c
diff --git a/match.c b/match.c
index 292c537..c330cd9 100644 (file)
--- a/match.c
+++ b/match.c
@@ -24,8 +24,6 @@ extern int csum_length;
 extern int verbose;
 extern int am_server;
 
-extern int remote_version;
-
 typedef unsigned short tag;
 
 #define TABLESIZE (1<<16)
@@ -153,9 +151,12 @@ static void hash_search(int f,struct sum_struct *s,
        last_i = -1;
 
        if (verbose > 2)
-               rprintf(FINFO,"hash search b=%d len=%.0f\n",s->n,(double)len);
+               rprintf(FINFO,"hash search b=%ld len=%.0f\n",
+                       (long) s->n, (double)len);
 
-       k = MIN(len, s->n);
+       /* cast is to make s->n signed; it should always be reasonably
+        * small */
+       k = MIN(len, (OFF_T) s->n);
        
        map = (schar *)map_ptr(buf,0,k);
        
@@ -170,8 +171,8 @@ static void hash_search(int f,struct sum_struct *s,
        end = len + 1 - s->sums[s->count-1].len;
        
        if (verbose > 3)
-               rprintf(FINFO,"hash search s->n=%d len=%.0f count=%d\n",
-                       s->n,(double)len,s->count);
+               rprintf(FINFO, "hash search s->n=%ld len=%.0f count=%ld\n",
+                       (long) s->n, (double) len, (long) s->count);
        
        do {
                tag t = gettag2(s1,s2);
@@ -319,13 +320,11 @@ void match_sums(int f, struct sum_struct *s, struct map_struct *buf, OFF_T len)
 
        sum_end(file_sum);
 
-       if (remote_version >= 14) {
-               if (verbose > 2)
-                       rprintf(FINFO,"sending file_sum\n");
-               write_buf(f,file_sum,MD4_SUM_LENGTH);
-               if (write_batch) /* dw */
-                   write_batch_delta_file(file_sum, MD4_SUM_LENGTH);
-       }
+       if (verbose > 2)
+               rprintf(FINFO,"sending file_sum\n");
+       write_buf(f,file_sum,MD4_SUM_LENGTH);
+       if (write_batch) /* dw */
+               write_batch_delta_file(file_sum, MD4_SUM_LENGTH);
 
        if (targets) {
                free(targets);