- Limit the maximum block size we compute for a file.
[rsync/rsync.git] / checksum.c
index 3acd970..ce30e72 100644 (file)
@@ -23,7 +23,7 @@ int csum_length=2; /* initial value */
 
 #define CSUM_CHUNK 64
 
-int checksum_seed = 0;
+extern int checksum_seed;
 extern int protocol_version;
 
 /*
@@ -135,13 +135,13 @@ static int sumresidue;
 static char sumrbuf[CSUM_CHUNK];
 static struct mdfour md;
 
-void sum_init(void)
+void sum_init(int seed)
 {
        char s[4];
        mdfour_begin(&md);
-       sumresidue=0;
-       SIVAL(s,0,checksum_seed);
-       sum_update(s,4);
+       sumresidue = 0;
+       SIVAL(s, 0, seed);
+       sum_update(s, 4);
 }
 
 /**