mirror of
https://git.tukaani.org/xz.git
synced 2024-04-04 12:36:23 +02:00
liblzma: Fix lzma_microlzma_encoder() return value.
Using return_if_error on lzma_lzma_lclppb_encode was improper because return_if_error is expecting an lzma_ret value, but lzma_lzma_lclppb_encode returns a boolean. This could result in lzma_microlzma_encoder, which would be misleading for applications.
This commit is contained in:
parent
b55a27b46f
commit
d3e6fe4419
1 changed files with 2 additions and 1 deletions
|
@ -111,7 +111,8 @@ microlzma_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
|||
|
||||
// Encode the properties byte. Bitwise-negation of it will be the
|
||||
// first output byte.
|
||||
return_if_error(lzma_lzma_lclppb_encode(options, &coder->props));
|
||||
if (lzma_lzma_lclppb_encode(options, &coder->props))
|
||||
return LZMA_OPTIONS_ERROR;
|
||||
|
||||
// Initialize the LZMA encoder.
|
||||
const lzma_filter_info filters[2] = {
|
||||
|
|
Loading…
Reference in a new issue