aboutsummaryrefslogtreecommitdiff
path: root/adler32.c
diff options
context:
space:
mode:
Diffstat (limited to 'adler32.c')
-rw-r--r--adler32.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/adler32.c b/adler32.c
index 0b2b820..0ad9bec 100644
--- a/adler32.c
+++ b/adler32.c
@@ -3,7 +3,7 @@
3 * For conditions of distribution and use, see copyright notice in zlib.h 3 * For conditions of distribution and use, see copyright notice in zlib.h
4 */ 4 */
5 5
6/* $Id: adler32.c,v 1.5 1995/04/14 14:49:51 jloup Exp $ */ 6/* $Id: adler32.c,v 1.6 1995/05/03 17:27:08 jloup Exp $ */
7 7
8#include "zutil.h" 8#include "zutil.h"
9 9
@@ -30,17 +30,17 @@ uLong adler32(adler, buf, len)
30 if (buf == Z_NULL) return 1L; 30 if (buf == Z_NULL) return 1L;
31 31
32 while (len > 0) { 32 while (len > 0) {
33 k = len < NMAX ? len : NMAX; 33 k = len < NMAX ? len : NMAX;
34 len -= k; 34 len -= k;
35 while (k >= 16) { 35 while (k >= 16) {
36 DO16(buf); 36 DO16(buf);
37 k -= 16; 37 k -= 16;
38 } 38 }
39 if (k != 0) do { 39 if (k != 0) do {
40 DO1(buf); 40 DO1(buf);
41 } while (--k); 41 } while (--k);
42 s1 %= BASE; 42 s1 %= BASE;
43 s2 %= BASE; 43 s2 %= BASE;
44 } 44 }
45 return (s2 << 16) | s1; 45 return (s2 << 16) | s1;
46} 46}