summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Moinvaziri <nathan@nathanm.com>2022-01-04 08:30:39 -0800
committerHans Kristian Rosbach <hk-github@circlestorm.org>2022-01-08 13:56:43 +0100
commit5c082d926cb7c7a939a8bd3fb760a33659d2ee58 (patch)
tree6619ef5e8b8a7c63f21da6d7ee607ca9a401aa16
parent18f6c95d504f643b69b63d86cff5efe669143cac (diff)
downloadProject-Tick-5c082d926cb7c7a939a8bd3fb760a33659d2ee58.tar.gz
Project-Tick-5c082d926cb7c7a939a8bd3fb760a33659d2ee58.zip
Remove use_byfour compile time detection of the existence of four byte integer types since we are targeting newer systems.
-rw-r--r--functable.c12
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)