Skip to content

Commit

Permalink
Standardize crc32_stub
Browse files Browse the repository at this point in the history
Reorganize statements inside crc32_stub() to match more closely the format
used for other function stubs in functable.c.
  • Loading branch information
mscastanho committed Jun 22, 2021
1 parent c0cca08 commit 366d9ba
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions functable.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down

0 comments on commit 366d9ba

Please sign in to comment.