summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatheus Castanho <msc@linux.ibm.com>2021-06-16 14:36:24 -0300
committerHans Kristian Rosbach <hk-github@circlestorm.org>2021-12-24 12:52:14 +0100
commit5bbf9ef0dae79f912a5fcfca8eab32c8df02f592 (patch)
treeb286fcd9f37ca30c4117355d68822ec8279c501d
parent7445409d0aa8c6884aa9d500b4daf03f1fb6b35e (diff)
Standardize crc32_stub
Reorganize statements inside crc32_stub() to match more closely the format used for other function stubs in functable.c.
-rw-r--r--functable.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/functable.c b/functable.c
index 32ab90e..807f7ae 100644
--- a/functable.c
+++ b/functable.c
@@ -378,6 +378,7 @@ Z_INTERNAL uint32_t crc32_stub(uint32_t crc, const unsigned char *buf, uint64_t
"crc32_z takes size_t but internally we have a uint64_t len");
/* return a function pointer for optimized arches here after a capability test */
+ functable.crc32 = &crc32_generic;
cpu_check_features();
if (use_byfour) {
@@ -392,8 +393,6 @@ Z_INTERNAL uint32_t crc32_stub(uint32_t crc, const unsigned char *buf, uint64_t
#else
# error No endian defined
#endif
- } else {
- functable.crc32 = crc32_generic;
}
return functable.crc32(crc, buf, len);