From: Yann Collet Date: Tue, 19 Dec 2017 20:20:46 +0000 (+0100) Subject: changed variable name for clarity, suggested by @terrelln X-Git-Tag: v1.3.3^2~1^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9096088f4529a25763ce4080376919c9479f48cc;p=thirdparty%2Fzstd.git changed variable name for clarity, suggested by @terrelln --- diff --git a/lib/compress/zstd_compress.c b/lib/compress/zstd_compress.c index 5f952b8c0..04b03bfcf 100644 --- a/lib/compress/zstd_compress.c +++ b/lib/compress/zstd_compress.c @@ -757,11 +757,11 @@ static U32 ZSTD_sufficientBuff(size_t bufferSize1, size_t blockSize1, ZSTD_compressionParameters cParams2, U64 pledgedSrcSize) { - size_t const windowSize = MAX(1, (size_t)MIN(((U64)1 << cParams2.windowLog), pledgedSrcSize)); - size_t const blockSize2 = MIN(ZSTD_BLOCKSIZE_MAX, windowSize); - size_t const neededBufferSize = (buffPol2==ZSTDb_buffered) ? windowSize + blockSize2 : 0; + size_t const windowSize2 = MAX(1, (size_t)MIN(((U64)1 << cParams2.windowLog), pledgedSrcSize)); + size_t const blockSize2 = MIN(ZSTD_BLOCKSIZE_MAX, windowSize2); + size_t const neededBufferSize2 = (buffPol2==ZSTDb_buffered) ? windowSize2 + blockSize2 : 0; return (blockSize2 <= blockSize1) /* seqStore space depends on blockSize */ - & (neededBufferSize <= bufferSize1); + & (neededBufferSize2 <= bufferSize1); } /** Equivalence for resetCCtx purposes */