diff options
Diffstat (limited to 'Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encode.c')
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encode.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encode.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encode.c index 4bf0cb4d98a..ec56da24632 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encode.c +++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encode.c @@ -117,7 +117,6 @@ typedef struct BrotliEncoderStateStruct { static BROTLI_BOOL EnsureInitialized(BrotliEncoderState* s); static size_t InputBlockSize(BrotliEncoderState* s) { - if (!EnsureInitialized(s)) return 0; return (size_t)1 << s->params.lgblock; } @@ -817,7 +816,6 @@ static void CopyInputToRingBuffer(BrotliEncoderState* s, const uint8_t* input_buffer) { RingBuffer* ringbuffer_ = &s->ringbuffer_; MemoryManager* m = &s->memory_manager_; - if (!EnsureInitialized(s)) return; RingBufferWrite(m, input_buffer, input_size, ringbuffer_); if (BROTLI_IS_OOM(m)) return; s->input_pos_ += input_size; @@ -882,7 +880,8 @@ static void ExtendLastCommand(BrotliEncoderState* s, uint32_t* bytes, Command* last_command = &s->commands_[s->num_commands_ - 1]; const uint8_t* data = s->ringbuffer_.buffer_; const uint32_t mask = s->ringbuffer_.mask_; - uint64_t max_backward_distance = (1u << s->params.lgwin) - BROTLI_WINDOW_GAP; + uint64_t max_backward_distance = + (((uint64_t)1) << s->params.lgwin) - BROTLI_WINDOW_GAP; uint64_t last_copy_len = last_command->copy_len_ & 0x1FFFFFF; uint64_t last_processed_pos = s->last_processed_pos_ - last_copy_len; uint64_t max_distance = last_processed_pos < max_backward_distance ? @@ -932,7 +931,6 @@ static BROTLI_BOOL EncodeData( MemoryManager* m = &s->memory_manager_; ContextType literal_context_mode; - if (!EnsureInitialized(s)) return BROTLI_FALSE; data = s->ringbuffer_.buffer_; mask = s->ringbuffer_.mask_; |