]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fix a variable name to reflect its nature 2464/head
authorQuentin Carbonneaux <quentin@c9x.me>
Fri, 22 Jan 2021 10:24:19 +0000 (02:24 -0800)
committerQuentin Carbonneaux <quentin@c9x.me>
Fri, 22 Jan 2021 10:24:19 +0000 (02:24 -0800)
lib/compress/zstd_ldm.c

index 36d63d052a056603b5e9bc765918015ac02341e9..c38e7753be9fa4209917b0d79ae647d63b95cd93 100644 (file)
@@ -295,7 +295,7 @@ static size_t ZSTD_ldm_generateSequences_internal(
     U64 rollingHash = 0;
 
     while (ip <= ilimit) {
-        U32 const currentOffset = (U32)(ip - base);
+        U32 const currentIndex = (U32)(ip - base);
         U32 hash, checksum;
         size_t mLength;
         size_t forwardMatchLength = 0, backwardMatchLength = 0;
@@ -320,7 +320,7 @@ static size_t ZSTD_ldm_generateSequences_internal(
         hash = ZSTD_ldm_getSmallHash(rollingHash, hBits);
         checksum = ZSTD_ldm_getChecksum(rollingHash, hBits);
 
-        newEntry.offset = currentOffset;
+        newEntry.offset = currentIndex;
         newEntry.checksum = checksum;
 
         /* Get the best entry and compute the match lengths */
@@ -391,11 +391,11 @@ static size_t ZSTD_ldm_generateSequences_internal(
 
         {
             /* Store the sequence:
-             * ip = currentOffset - backwardMatchLength
+             * ip = currentIndex - backwardMatchLength
              * The match is at (bestEntry->offset - backwardMatchLength)
              */
             U32 const matchIndex = bestEntry->offset;
-            U32 const offset = currentOffset - matchIndex;
+            U32 const offset = currentIndex - matchIndex;
             rawSeq* const seq = rawSeqStore->seq + rawSeqStore->size;
 
             /* Out of sequence storage */