fileio: fixed LZ4F invocation from assert()
This commit is contained in:
+1
-1
@@ -639,7 +639,6 @@ static unsigned long long FIO_compressLz4Frame(cRess_t* ress,
|
|||||||
memset(&prefs, 0, sizeof(prefs));
|
memset(&prefs, 0, sizeof(prefs));
|
||||||
|
|
||||||
assert(blockSize <= ress->srcBufferSize);
|
assert(blockSize <= ress->srcBufferSize);
|
||||||
assert(LZ4F_compressBound(blockSize) <= ress->dstBufferSize);
|
|
||||||
|
|
||||||
prefs.autoFlush = 1;
|
prefs.autoFlush = 1;
|
||||||
prefs.compressionLevel = compressionLevel;
|
prefs.compressionLevel = compressionLevel;
|
||||||
@@ -649,6 +648,7 @@ static unsigned long long FIO_compressLz4Frame(cRess_t* ress,
|
|||||||
#if LZ4_VERSION_NUMBER >= 10600
|
#if LZ4_VERSION_NUMBER >= 10600
|
||||||
prefs.frameInfo.contentSize = (srcFileSize==UTIL_FILESIZE_UNKNOWN) ? 0 : srcFileSize;
|
prefs.frameInfo.contentSize = (srcFileSize==UTIL_FILESIZE_UNKNOWN) ? 0 : srcFileSize;
|
||||||
#endif
|
#endif
|
||||||
|
assert(LZ4F_compressBound(blockSize, &prefs) <= ress->dstBufferSize);
|
||||||
|
|
||||||
{
|
{
|
||||||
size_t readSize;
|
size_t readSize;
|
||||||
|
|||||||
Reference in New Issue
Block a user