aboutsummaryrefslogtreecommitdiff
path: root/crc32.c
diff options
context:
space:
mode:
Diffstat (limited to 'crc32.c')
-rw-r--r--crc32.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crc32.c b/crc32.c
index 9580440..e72636a 100644
--- a/crc32.c
+++ b/crc32.c
@@ -212,7 +212,7 @@ unsigned long ZEXPORT crc32_z(crc, buf, len)
212#endif /* DYNAMIC_CRC_TABLE */ 212#endif /* DYNAMIC_CRC_TABLE */
213 213
214#ifdef BYFOUR 214#ifdef BYFOUR
215 if (sizeof(void *) == sizeof(ptrdiff_t)) { 215 if (sizeof(void *) == sizeof(z_size_t)) {
216 z_crc_t endian; 216 z_crc_t endian;
217 217
218 endian = 1; 218 endian = 1;
@@ -273,7 +273,7 @@ local unsigned long crc32_little(crc, buf, len)
273 273
274 c = (z_crc_t)crc; 274 c = (z_crc_t)crc;
275 c = ~c; 275 c = ~c;
276 while (len && ((ptrdiff_t)buf & 3)) { 276 while (len && ((z_size_t)buf & 3)) {
277 c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8); 277 c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
278 len--; 278 len--;
279 } 279 }
@@ -313,7 +313,7 @@ local unsigned long crc32_big(crc, buf, len)
313 313
314 c = ZSWAP32((z_crc_t)crc); 314 c = ZSWAP32((z_crc_t)crc);
315 c = ~c; 315 c = ~c;
316 while (len && ((ptrdiff_t)buf & 3)) { 316 while (len && ((z_size_t)buf & 3)) {
317 c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8); 317 c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
318 len--; 318 len--;
319 } 319 }