diff options
author | Madelyn Olson <matolson@amazon.com> | 2020-04-24 17:05:37 -0700 |
---|---|---|
committer | Madelyn Olson <matolson@amazon.com> | 2020-04-24 17:05:52 -0700 |
commit | 2192a91d62be77987d6ac1691f380300168c31d5 (patch) | |
tree | 404d8479372a342e2009c2eb8837fb1f0dcab151 | |
parent | 486e45ffafe2349e7bd8238d6d3b48caf57accd9 (diff) | |
download | redis-2192a91d62be77987d6ac1691f380300168c31d5.tar.gz |
Made crc64 test consistent
-rw-r--r-- | src/crc64.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/crc64.c b/src/crc64.c index 165941dea..4cbc019f6 100644 --- a/src/crc64.c +++ b/src/crc64.c @@ -30,6 +30,7 @@ #include "crcspeed.h" static uint64_t crc64_table[8][256] = {{0}}; +#define POLY UINT64_C(0xad93d23594c935a9) /******************** BEGIN GENERATED PYCRC FUNCTIONS ********************/ /** * Generated on Sun Dec 21 14:14:07 2014, @@ -122,7 +123,7 @@ uint64_t crc64(uint64_t crc, const unsigned char *s, uint64_t l) { } /* Test main */ -#if defined(REDIS_TEST) || defined(REDIS_TEST_MAIN) +#ifdef REDIS_TEST #include <stdio.h> #define UNUSED(x) (void)(x) @@ -133,7 +134,7 @@ int crc64Test(int argc, char *argv[]) { printf("[calcula]: e9c6d914c4b8d9ca == %016" PRIx64 "\n", (uint64_t)_crc64(0, "123456789", 9)); printf("[64speed]: e9c6d914c4b8d9ca == %016" PRIx64 "\n", - (uint64_t)crc64speed(0, "123456789", 9)); + (uint64_t)crc64(0, "123456789", 9)); char li[] = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed " "do eiusmod tempor incididunt ut labore et dolore magna " "aliqua. Ut enim ad minim veniam, quis nostrud exercitation " |