mirror of
https://github.com/facebook/zstd.git
synced 2025-10-09 00:05:28 -04:00
fixed minor coverity warning
This commit is contained in:
parent
e20d5cf117
commit
e9ed5cdc94
@ -929,8 +929,8 @@ size_t ZDICT_trainFromBuffer_unsafe(
|
|||||||
size_t dictSize = 0;
|
size_t dictSize = 0;
|
||||||
|
|
||||||
/* checks */
|
/* checks */
|
||||||
if (maxDictSize <= g_provision_entropySize + g_min_fast_dictContent) return ERROR(dstSize_tooSmall);
|
|
||||||
if (!dictList) return ERROR(memory_allocation);
|
if (!dictList) return ERROR(memory_allocation);
|
||||||
|
if (maxDictSize <= g_provision_entropySize + g_min_fast_dictContent) { free(dictList); return ERROR(dstSize_tooSmall); }
|
||||||
|
|
||||||
/* init */
|
/* init */
|
||||||
{ unsigned u; for (u=0, sBuffSize=0; u<nbSamples; u++) sBuffSize += samplesSizes[u]; }
|
{ unsigned u; for (u=0, sBuffSize=0; u<nbSamples; u++) sBuffSize += samplesSizes[u]; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user