codemod: ZSTD_sequenceLength -> ZSTD_SequenceLength

This commit is contained in:
Yann Collet
2024-12-20 10:36:55 -08:00
parent a2245721ca
commit 8d4506bc94
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -121,15 +121,15 @@ typedef struct {
typedef struct {
U32 litLength;
U32 matchLength;
} ZSTD_sequenceLength;
} ZSTD_SequenceLength;
/**
* Returns the ZSTD_sequenceLength for the given sequences. It handles the decoding of long sequences
* Returns the ZSTD_SequenceLength for the given sequences. It handles the decoding of long sequences
* indicated by longLengthPos and longLengthType, and adds MINMATCH back to matchLength.
*/
MEM_STATIC ZSTD_sequenceLength ZSTD_getSequenceLength(SeqStore_t const* seqStore, SeqDef const* seq)
MEM_STATIC ZSTD_SequenceLength ZSTD_getSequenceLength(SeqStore_t const* seqStore, SeqDef const* seq)
{
ZSTD_sequenceLength seqLen;
ZSTD_SequenceLength seqLen;
seqLen.litLength = seq->litLength;
seqLen.matchLength = seq->mlBase + MINMATCH;
if (seqStore->longLengthPos == (U32)(seq - seqStore->sequencesStart)) {
+1 -1
View File
@@ -134,7 +134,7 @@ ZSTD_seqDecompressedSize(SeqStore_t const* seqStore,
size_t litLengthSum = 0;
size_t n;
for (n=0; n<nbSeqs; n++) {
const ZSTD_sequenceLength seqLen = ZSTD_getSequenceLength(seqStore, sequences+n);
const ZSTD_SequenceLength seqLen = ZSTD_getSequenceLength(seqStore, sequences+n);
litLengthSum += seqLen.litLength;
matchLengthSum += seqLen.matchLength;
}