Fix minor syntax issues.

Missing semicolons.
Move checks below variable declarations for c89.

PiperOrigin-RevId: 624199887
This commit is contained in:
Brotli 2024-04-12 09:15:22 -07:00 committed by Copybara-Service
parent a76d96e730
commit 709c4672d4
4 changed files with 4 additions and 4 deletions

View File

@ -557,7 +557,7 @@ static BROTLI_INLINE void FindCompoundDictionaryMatch(
offset = distance_offset - distance;
limit = source_size - offset;
limit = limit > max_length ? max_length : limit;
BROTLI_DCHECK(cur_ix_masked + limit <= ring_buffer_mask)
BROTLI_DCHECK(cur_ix_masked + limit <= ring_buffer_mask);
len = FindMatchLengthWithLimit(&source[offset], &data[cur_ix_masked],
limit);
if (len >= 2) {

View File

@ -203,12 +203,12 @@ static BROTLI_INLINE void FN(FindLongestMatch)(
uint8_t* BROTLI_RESTRICT tiny_hashes = FN(TinyHash)(self->extra[0]);
FN(Bank)* BROTLI_RESTRICT banks = FN(Banks)(self->extra[1]);
const size_t cur_ix_masked = cur_ix & ring_buffer_mask;
BROTLI_DCHECK(cur_ix_masked + max_length <= ring_buffer_mask)
/* Don't accept a short copy from far away. */
score_t min_score = out->score;
score_t best_score = out->score;
size_t best_len = out->len;
size_t i;
BROTLI_DCHECK(cur_ix_masked + max_length <= ring_buffer_mask);
const size_t key = FN(HashBytes)(&data[cur_ix_masked]);
const uint8_t tiny_hash = (uint8_t)(key);
out->len = 0;

View File

@ -165,12 +165,12 @@ static BROTLI_INLINE void FN(FindLongestMatch)(
uint16_t* BROTLI_RESTRICT num = self->num_;
uint32_t* BROTLI_RESTRICT buckets = self->buckets_;
const size_t cur_ix_masked = cur_ix & ring_buffer_mask;
BROTLI_DCHECK(cur_ix_masked + max_length <= ring_buffer_mask)
/* Don't accept a short copy from far away. */
score_t min_score = out->score;
score_t best_score = out->score;
size_t best_len = out->len;
size_t i;
BROTLI_DCHECK(cur_ix_masked + max_length <= ring_buffer_mask);
out->len = 0;
out->len_code_delta = 0;
/* Try last distance first. */

View File

@ -164,12 +164,12 @@ static BROTLI_INLINE void FN(FindLongestMatch)(
uint16_t* BROTLI_RESTRICT num = self->num_;
uint32_t* BROTLI_RESTRICT buckets = self->buckets_;
const size_t cur_ix_masked = cur_ix & ring_buffer_mask;
BROTLI_DCHECK(cur_ix_masked + max_length <= ring_buffer_mask)
/* Don't accept a short copy from far away. */
score_t min_score = out->score;
score_t best_score = out->score;
size_t best_len = out->len;
size_t i;
BROTLI_DCHECK(cur_ix_masked + max_length <= ring_buffer_mask);
out->len = 0;
out->len_code_delta = 0;
/* Try last distance first. */