]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Consistency in Guarding DMS-Only Variable Initializations
authorW. Felix Handte <w@felixhandte.com>
Wed, 20 Jun 2018 20:54:53 +0000 (16:54 -0400)
committerW. Felix Handte <w@felixhandte.com>
Wed, 20 Jun 2018 20:54:53 +0000 (16:54 -0400)
lib/compress/zstd_opt.c

index 90a2620251b23510f70028efcf8c7abfff749bf1..3a6e4c45df6cac809eaf3b4886bafa564a568f35 100644 (file)
@@ -526,7 +526,7 @@ U32 ZSTD_insertBtAndGetAllMatches (
     U32 mnum = 0;
     U32 nbCompares = 1U << cParams->searchLog;
 
-    const ZSTD_matchState_t* dms = ms->dictMatchState;
+    const ZSTD_matchState_t* dms    = dictMode == ZSTD_dictMatchState ? ms->dictMatchState : NULL;
     const BYTE* const dmsBase       = dictMode == ZSTD_dictMatchState ? dms->window.base : NULL;
     const BYTE* const dmsEnd        = dictMode == ZSTD_dictMatchState ? dms->window.nextSrc : NULL;
     U32         const dmsHighLimit  = dictMode == ZSTD_dictMatchState ? (U32)(dmsEnd - dmsBase) : 0;