*** empty log message ***
authorAndrew Tridgell <tridge@samba.org>
Wed, 3 Jul 1996 08:18:11 +0000 (08:18 +0000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 3 Jul 1996 08:18:11 +0000 (08:18 +0000)
checksum.c

index 2344b63..1fd1c55 100644 (file)
@@ -152,6 +152,12 @@ void sum_init(void)
 void sum_update(char *p,int len)
 {
   int i;
 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);
   if (sumresidue) {
     i = MIN(CSUM_CHUNK-sumresidue,len);
     bcopy(p,sumrbuf+sumresidue,i);