diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2016-12-31 16:57:26 -0800 |
---|---|---|
committer | Hans Kristian Rosbach <hk-git@circlestorm.org> | 2017-02-09 11:21:35 +0100 |
commit | 73ba5ea69e0ef6f389aa3edd81d8f1038324d198 (patch) | |
tree | 95b2ebf89d88dcff6fa1f30f6ae87b71df7d5c3d /adler32.c | |
parent | cd0071573cb2189ab059c91d1249e5ec4a4df991 (diff) |
Add crc32_z() and adler32_z() functions with size_t lengths.
Diffstat (limited to 'adler32.c')
-rw-r--r-- | adler32.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -60,7 +60,7 @@ static uint32_t adler32_combine_(uint32_t adler1, uint32_t adler2, z_off64_t len #endif /* ========================================================================= */ -uint32_t ZEXPORT adler32(uint32_t adler, const unsigned char *buf, uint32_t len) { +uint32_t ZEXPORT adler32_z(uint32_t adler, const unsigned char *buf, size_t len) { uint32_t sum2; unsigned n; @@ -143,6 +143,11 @@ uint32_t ZEXPORT adler32(uint32_t adler, const unsigned char *buf, uint32_t len) } /* ========================================================================= */ +uint32_t ZEXPORT adler32(uint32_t adler, const unsigned char *buf, uint32_t len) { + return adler32_z(adler, buf, len); +} + +/* ========================================================================= */ static uint32_t adler32_combine_(uint32_t adler1, uint32_t adler2, z_off64_t len2) { uint32_t sum1; uint32_t sum2; |