diff options
author | Yann Collet <cyan@fb.com> | 2017-03-16 09:16:24 (GMT) |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2017-03-16 09:16:24 (GMT) |
commit | 430b7d32b3f804ece3be95f0b36fb584947d6c73 (patch) | |
tree | 46f2cea47b2e93674a5288ffff93a0290acdb7bc /tests/fuzzer.c | |
parent | 9144520dc986db9fffcdc9e2afecdb9db226a756 (diff) | |
download | lz4-430b7d32b3f804ece3be95f0b36fb584947d6c73.zip lz4-430b7d32b3f804ece3be95f0b36fb584947d6c73.tar.gz lz4-430b7d32b3f804ece3be95f0b36fb584947d6c73.tar.bz2 |
created LZ4_HC_STATIC_LINKING_ONLY section
where are exposed new prototypes *_destSize()
Diffstat (limited to 'tests/fuzzer.c')
-rw-r--r-- | tests/fuzzer.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/fuzzer.c b/tests/fuzzer.c index 6da0ea5..c63ecb2 100644 --- a/tests/fuzzer.c +++ b/tests/fuzzer.c @@ -43,6 +43,7 @@ #include <stdio.h> /* fgets, sscanf */ #include <string.h> /* strcmp */ #include <time.h> /* clock_t, clock, CLOCKS_PER_SEC */ +#define LZ4_HC_STATIC_LINKING_ONLY #include "lz4hc.h" #define XXH_STATIC_LINKING_ONLY #include "xxhash.h" @@ -353,11 +354,11 @@ static int FUZ_test(U32 seed, U32 nbCycles, const U32 startCycle, const double c FUZ_DISPLAYTEST; { int srcSize = blockSize; int const targetSize = srcSize * ((FUZ_rand(&randState) & 127)+1) >> 7; - char endCheck = FUZ_rand(&randState) & 255; - void * ctx = LZ4_createHC(block); + char const endCheck = FUZ_rand(&randState) & 255; + void* ctx = LZ4_createHC(block); FUZ_CHECKTEST(ctx==NULL, "LZ4_createHC() allocation failed"); compressedBuffer[targetSize] = endCheck; - ret = LZ4_compressHC_destSize(ctx, block, compressedBuffer, &srcSize, targetSize, compressionLevel); + ret = LZ4_compress_HC_destSize(ctx, block, compressedBuffer, &srcSize, targetSize, compressionLevel); LZ4_freeHC(ctx); FUZ_CHECKTEST(ret > targetSize, "LZ4_compressHC_destSize() result larger than dst buffer !"); FUZ_CHECKTEST(compressedBuffer[targetSize] != endCheck, "LZ4_compressHC_destSize() overwrite dst buffer !"); |