Skip to content

Commit

Permalink
Fix minor syntax issues.
Browse files Browse the repository at this point in the history
Missing semicolons.
Move checks below variable declarations for c89.

PiperOrigin-RevId: 624199887
  • Loading branch information
Brotli authored and Copybara-Service committed Apr 12, 2024
1 parent a76d96e commit 709c467
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion c/enc/hash.h
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion c/enc/hash_forgetful_chain_inc.h
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion c/enc/hash_longest_match64_inc.h
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion c/enc/hash_longest_match_inc.h
Expand Up @@ -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. */
Expand Down

0 comments on commit 709c467

Please sign in to comment.