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 Jul 15, 2021
1 parent 12a975a commit a3185a4
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 @@ -452,6 +452,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 @@ -470,8 +471,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 a3185a4

Please sign in to comment.