diff options
| -rw-r--r-- | functable.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/functable.c b/functable.c index 0118dc5b74..5d0005a985 100644 --- a/functable.c +++ b/functable.c @@ -519,22 +519,16 @@ Z_INTERNAL uint8_t* chunkmemset_safe_stub(uint8_t *out, unsigned dist, unsigned } Z_INTERNAL uint32_t crc32_stub(uint32_t crc, const unsigned char *buf, uint64_t len) { - int32_t use_byfour = sizeof(void *) == sizeof(ptrdiff_t); - Assert(sizeof(uint64_t) >= sizeof(size_t), "crc32_z takes size_t but internally we have a uint64_t len"); - if (use_byfour) { #if BYTE_ORDER == LITTLE_ENDIAN - functable.crc32 = crc32_little; + functable.crc32 = crc32_little; #elif BYTE_ORDER == BIG_ENDIAN - functable.crc32 = crc32_big; + functable.crc32 = crc32_big; #else -# error No endian defined + functable.crc32 = &crc32_generic; #endif - } else { - functable.crc32 = &crc32_generic; - } cpu_check_features(); #ifdef ARM_ACLE_CRC_HASH if (arm_cpu_has_crc32) |
