Skip to content

Commit 75865cc

Browse files
committed
Remove blockCompressor NULL Checks
1 parent 84ef90a commit 75865cc

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

lib/compress/zstd_compress.c

-2
Original file line numberDiff line numberDiff line change
@@ -3344,7 +3344,6 @@ static size_t ZSTD_buildSeqStore(ZSTD_CCtx* zc, const void* src, size_t srcSize)
33443344
"External sequence producer returned error code %lu. Falling back to internal parser.",
33453345
(unsigned long)nbExternalSeqs
33463346
);
3347-
RETURN_ERROR_IF(blockCompressor == NULL, parameter_combination_unsupported, "Got NULL block compressor!");
33483347
lastLLSize = blockCompressor(ms, &zc->seqStore, zc->blockState.nextCBlock->rep, src, srcSize);
33493348
} }
33503349
} else { /* not long range mode and no external matchfinder */
@@ -3353,7 +3352,6 @@ static size_t ZSTD_buildSeqStore(ZSTD_CCtx* zc, const void* src, size_t srcSize)
33533352
zc->appliedParams.useRowMatchFinder,
33543353
dictMode);
33553354
ms->ldmSeqStore = NULL;
3356-
RETURN_ERROR_IF(blockCompressor == NULL, parameter_combination_unsupported, "Got NULL block compressor!");
33573355
lastLLSize = blockCompressor(ms, &zc->seqStore, zc->blockState.nextCBlock->rep, src, srcSize);
33583356
}
33593357
{ const BYTE* const lastLiterals = (const BYTE*)src + srcSize - lastLLSize;

lib/compress/zstd_ldm.c

-2
Original file line numberDiff line numberDiff line change
@@ -676,8 +676,6 @@ size_t ZSTD_ldm_blockCompress(rawSeqStore_t* rawSeqStore,
676676
/* Input positions */
677677
BYTE const* ip = istart;
678678

679-
RETURN_ERROR_IF(blockCompressor == NULL, parameter_combination_unsupported, "Got NULL block compressor!");
680-
681679
DEBUGLOG(5, "ZSTD_ldm_blockCompress: srcSize=%zu", srcSize);
682680
/* If using opt parser, use LDMs only as candidates rather than always accepting them */
683681
if (cParams->strategy >= ZSTD_btopt) {

0 commit comments

Comments
 (0)