Define kNullRawSeqStore for every file

This commit is contained in:
senhuang42
2020-10-07 19:02:41 -04:00
parent a6165c1b28
commit b9c8033cde
4 changed files with 5 additions and 11 deletions
+2 -8
View File
@@ -964,14 +964,8 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms,
ZSTD_optimal_t lastSequence;
ZSTD_optLdm_t optLdm;
if (ms->ldmSeqStore) {
optLdm.seqStore = *ms->ldmSeqStore;
optLdm.endPosInBlock = optLdm.startPosInBlock = optLdm.offset = 0;
} else {
optLdm.seqStore.size = optLdm.seqStore.pos = 0;
}
/* Get first match from ldm seq store if long mode is enabled */
optLdm.seqStore = ms->ldmSeqStore ? *ms->ldmSeqStore : kNullRawSeqStore;
optLdm.endPosInBlock = optLdm.startPosInBlock = optLdm.offset = 0;
ZSTD_opt_getNextMatchAndUpdateSeqStore(&optLdm, (U32)(ip-istart), (U32)(iend-ip));
/* init */