*** empty log message ***
[rsync/rsync.git] / checksum.c
index 2344b63..1fd1c55 100644 (file)
@@ -152,6 +152,12 @@ void sum_init(void)
 void sum_update(char *p,int len)
 {
   int i;
+  if (len + sumresidue < CSUM_CHUNK) {
+    bcopy(p,sumrbuf+sumresidue,len);
+    sumresidue += len;
+    return;
+  }
+
   if (sumresidue) {
     i = MIN(CSUM_CHUNK-sumresidue,len);
     bcopy(p,sumrbuf+sumresidue,i);