diff options
author | Yann Collet <Cyan4973@users.noreply.github.com> | 2022-08-15 22:45:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-15 22:45:31 (GMT) |
commit | 5ff839680134437dbf4678f3d0c7b371d84f4964 (patch) | |
tree | 939d919c3903b42ed637542a4799fb3f4fa8b5fc /tests/roundTripTest.c | |
parent | 416bc96faca629abcef42e56ecd2e20d26b79934 (diff) | |
parent | cfd6ab32522280079c2e6d3ea995f172b9ae0312 (diff) | |
download | lz4-5ff839680134437dbf4678f3d0c7b371d84f4964.zip lz4-5ff839680134437dbf4678f3d0c7b371d84f4964.tar.gz lz4-5ff839680134437dbf4678f3d0c7b371d84f4964.tar.bz2 |
stage v1.9.4
Diffstat (limited to 'tests/roundTripTest.c')
-rw-r--r-- | tests/roundTripTest.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/roundTripTest.c b/tests/roundTripTest.c index 2d34451..3e9d6ed 100644 --- a/tests/roundTripTest.c +++ b/tests/roundTripTest.c @@ -1,11 +1,11 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. + * in the COPYING file in the root directory of this source tree), + * meaning you may select, at your option, one of the above-listed licenses. */ /* @@ -104,7 +104,7 @@ static void roundTripTest(void* resultBuff, size_t resultBuffCapacity, int clevel) { int const proposed_clevel = clevel ? clevel : select_clevel(srcBuff, srcSize); - int const selected_clevel = proposed_clevel < 0 ? -proposed_clevel : proposed_clevel; /* if level < 0, it becomes an accelearion value */ + int const selected_clevel = proposed_clevel < 0 ? -proposed_clevel : proposed_clevel; /* if level < 0, it becomes an acceleration value */ compressFn compress = selected_clevel >= LZ4HC_CLEVEL_MIN ? LZ4_compress_HC : LZ4_compress_fast; int const cSize = compress((const char*)srcBuff, (char*)compressedBuff, (int)srcSize, (int)compressedBuffCapacity, selected_clevel); CONTROL_MSG(cSize == 0, "Compression error !"); @@ -126,7 +126,7 @@ static void roundTripTest(void* resultBuff, size_t resultBuffCapacity, static void roundTripCheck(const void* srcBuff, size_t srcSize, int clevel) { - size_t const cBuffSize = LZ4_compressBound((int)srcSize); + size_t const cBuffSize = LZ4_COMPRESSBOUND(srcSize); void* const cBuff = malloc(cBuffSize); void* const rBuff = malloc(cBuffSize); |