summaryrefslogtreecommitdiff
path: root/checksum.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1996-07-03 08:18:11 +0000
committerAndrew Tridgell <tridge@samba.org>1996-07-03 08:18:11 +0000
commitf94e821c782952437d7fe5a2ae1e0b1db8a4f4ab (patch)
treec211bb425b23e57657d1f8fbcc608610132ae885 /checksum.c
parent038406fdfef4945bfa18f760377cc45cd6221982 (diff)
downloadrsync-f94e821c782952437d7fe5a2ae1e0b1db8a4f4ab.tar.gz
rsync-f94e821c782952437d7fe5a2ae1e0b1db8a4f4ab.tar.bz2
rsync-f94e821c782952437d7fe5a2ae1e0b1db8a4f4ab.zip
*** empty log message ***
Diffstat (limited to 'checksum.c')
-rw-r--r--checksum.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/checksum.c b/checksum.c
index 2344b632..1fd1c55c 100644
--- a/checksum.c
+++ b/checksum.c
@@ -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);