Skip to content

Commit

Permalink
Fix Comments Slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhandte committed May 11, 2022
1 parent cd1f582 commit 00abd35
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/compress/zstd_fast.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ ZSTD_compressBlock_fast_noDict_generic(
offcode = REPCODE1_TO_OFFBASE;
mLength += 4;

/* first write next hash table entry; we've already calculated it */
/* First write next hash table entry; we've already calculated it.
* This write is known to be safe because the ip1 is before the
* repcode (ip2). */
hashTable[hash1] = (U32)(ip1 - base);

goto _match;
Expand All @@ -200,7 +202,9 @@ ZSTD_compressBlock_fast_noDict_generic(
if (MEM_read32(ip0) == mval) {
/* found a match! */

/* first write next hash table entry; we've already calculated it */
/* First write next hash table entry; we've already calculated it.
* This write is known to be safe because the ip1 == ip0 + 1, so
* we know we will resume searching after ip1 */
hashTable[hash1] = (U32)(ip1 - base);

goto _offset;
Expand Down Expand Up @@ -244,10 +248,6 @@ ZSTD_compressBlock_fast_noDict_generic(
* ip1 is ip0 + step - 1. If ip1 is >= ip0 + 4, we can't safely
* write this position. The expedient thing to do is just to
* write a bad position.
*
* We perform this check here, separate from the write, because
* this is the only match path where this can occur. (In rep-
* code and the first match checks, ip1 == ip0 + 1.)
*/
hashTable[hash1] = (U32)(ip1 - base);
}
Expand Down

0 comments on commit 00abd35

Please sign in to comment.