mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-28 19:06:42 -05:00
Uses the CRC_IV directly in the crc32c() function.
This commit is contained in:
parent
5136eb3719
commit
9d00435b42
4 changed files with 21 additions and 13 deletions
|
|
@ -262,7 +262,7 @@ static void crc32ctest(void)
|
|||
|
||||
for(i=0;TEST_CRC32C[i].data;++i) {
|
||||
uint32_t digest;
|
||||
digest = CRC_IV ^ crc32c(CRC_IV, (const unsigned char*)TEST_CRC32C[i].data, TEST_CRC32C[i].len);
|
||||
digest = crc32c(0, (const unsigned char*)TEST_CRC32C[i].data, TEST_CRC32C[i].len);
|
||||
if (digest != TEST_CRC32C[i].digest) {
|
||||
fprintf(stderr, "Failed CRC32C test vector %u\n", i);
|
||||
exit(EXIT_FAILURE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue