From: W. Felix Handte Date: Wed, 20 Jun 2018 19:27:23 +0000 (-0400) Subject: Minor Changes X-Git-Tag: v1.3.5~3^2~10^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a6cf7cd1d02b42fcdff17d1a538f021ad6c8345;p=thirdparty%2Fzstd.git Minor Changes --- diff --git a/lib/compress/zstd_opt.c b/lib/compress/zstd_opt.c index 5296d9603..0abdf3b90 100644 --- a/lib/compress/zstd_opt.c +++ b/lib/compress/zstd_opt.c @@ -359,7 +359,7 @@ static U32 ZSTD_insertAndFindFirstIndexHash3 (ZSTD_matchState_t* ms, const BYTE* /** ZSTD_insertBt1() : add one or multiple positions to tree. * ip : assumed <= iend-8 . * @return : nb of positions added */ -static U32 ZSTD_insertBt1( +FORCE_INLINE_TEMPLATE U32 ZSTD_insertBt1( ZSTD_matchState_t* ms, ZSTD_compressionParameters const* cParams, const BYTE* const ip, const BYTE* const iend, U32 const mls, const ZSTD_dictMode_e dictMode) @@ -665,11 +665,10 @@ U32 ZSTD_insertBtAndGetAllMatches ( *smallerPtr = *largerPtr = 0; - commonLengthSmaller = commonLengthLarger = 0; - if (dictMode == ZSTD_dictMatchState && nbCompares) { U32 dictMatchIndex = dms->hashTable[h]; const U32* const dmsBt = dms->chainTable; + commonLengthSmaller = commonLengthLarger = 0; while (nbCompares-- && (dictMatchIndex > dmsLowLimit)) { const U32* const nextPtr = dmsBt + 2*(dictMatchIndex & btMask); size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of common bytes */