From 0a6cf7cd1d02b42fcdff17d1a538f021ad6c8345 Mon Sep 17 00:00:00 2001 From: "W. Felix Handte" Date: Wed, 20 Jun 2018 15:27:23 -0400 Subject: [PATCH] Minor Changes --- lib/compress/zstd_opt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/compress/zstd_opt.c b/lib/compress/zstd_opt.c index 5296d960..0abdf3b9 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 */