summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2018-05-07 19:14:26 (GMT)
committerYann Collet <cyan@fb.com>2018-05-07 19:14:26 (GMT)
commitba1c7148a56029aa01795bfcf8cc365a2551f968 (patch)
tree2606a2d11bf2c89bc25529704ad3023d74e7b471
parent200b2960d5a5d0fe76d34bb826c236c7c2941563 (diff)
downloadlz4-ba1c7148a56029aa01795bfcf8cc365a2551f968.zip
lz4-ba1c7148a56029aa01795bfcf8cc365a2551f968.tar.gz
lz4-ba1c7148a56029aa01795bfcf8cc365a2551f968.tar.bz2
renamed variable for clarity
-rw-r--r--lib/lz4hc.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/lz4hc.c b/lib/lz4hc.c
index b89983f..8108ea0 100644
--- a/lib/lz4hc.c
+++ b/lib/lz4hc.c
@@ -243,7 +243,7 @@ LZ4HC_InsertAndGetWiderMatch (
matchIndex, lowestMatchIndex);
while ((matchIndex>=lowestMatchIndex) && (nbAttempts)) {
- int mlt=0;
+ int matchLength=0;
nbAttempts--;
assert(matchIndex < ipIndex);
if (favorDecSpeed && (ipIndex - matchIndex < 8)) {
@@ -256,10 +256,10 @@ LZ4HC_InsertAndGetWiderMatch (
if (LZ4_read16(iLowLimit + longest - 1) == LZ4_read16(matchPtr - lookBackLength + longest - 1)) {
if (LZ4_read32(matchPtr) == pattern) {
int const back = lookBackLength ? LZ4HC_countBack(ip, matchPtr, iLowLimit, lowPrefixPtr) : 0;
- mlt = MINMATCH + LZ4_count(ip+MINMATCH, matchPtr+MINMATCH, iHighLimit);
- mlt -= back;
- if (mlt > longest) {
- longest = mlt;
+ matchLength = MINMATCH + LZ4_count(ip+MINMATCH, matchPtr+MINMATCH, iHighLimit);
+ matchLength -= back;
+ if (matchLength > longest) {
+ longest = matchLength;
*matchpos = matchPtr + back;
*startpos = ip + back;
} } }
@@ -270,18 +270,18 @@ LZ4HC_InsertAndGetWiderMatch (
int back = 0;
const BYTE* vLimit = ip + (dictLimit - matchIndex);
if (vLimit > iHighLimit) vLimit = iHighLimit;
- mlt = LZ4_count(ip+MINMATCH, matchPtr+MINMATCH, vLimit) + MINMATCH;
- if ((ip+mlt == vLimit) && (vLimit < iHighLimit))
- mlt += LZ4_count(ip+mlt, lowPrefixPtr, iHighLimit);
+ matchLength = LZ4_count(ip+MINMATCH, matchPtr+MINMATCH, vLimit) + MINMATCH;
+ if ((ip+matchLength == vLimit) && (vLimit < iHighLimit))
+ matchLength += LZ4_count(ip+matchLength, lowPrefixPtr, iHighLimit);
back = lookBackLength ? LZ4HC_countBack(ip, matchPtr, iLowLimit, dictStart) : 0;
- mlt -= back;
- if (mlt > longest) {
- longest = mlt;
+ matchLength -= back;
+ if (matchLength > longest) {
+ longest = matchLength;
*matchpos = base + matchIndex + back; /* virtual pos, relative to ip, to retrieve offset */
*startpos = ip + back;
} } }
- if (chainSwap && mlt==longest) { /* better match => select a better chain */
+ if (chainSwap && matchLength==longest) { /* better match => select a better chain */
assert(lookBackLength==0); /* search forward only */
if (matchIndex + longest <= ipIndex) {
U32 distanceToNextMatch = 1;