diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2007-12-09 17:06:45 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2007-12-09 17:06:45 +0200 |
commit | 07ac881779a8477f2c1ab112b91a129e24aa743c (patch) | |
tree | fe7f62c63b22b5942c4556ff56125cd0330129e2 /src/liblzma/common/block_decoder.c | |
parent | Added a bunch of .lzma test files. (diff) | |
download | xz-07ac881779a8477f2c1ab112b91a129e24aa743c.tar.xz |
Take advantage of return_if_error() macro in more places.
Cleaned Subblock filter's initialization code too.
Diffstat (limited to 'src/liblzma/common/block_decoder.c')
-rw-r--r-- | src/liblzma/common/block_decoder.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/liblzma/common/block_decoder.c b/src/liblzma/common/block_decoder.c index b9dcde49..af2b0203 100644 --- a/src/liblzma/common/block_decoder.c +++ b/src/liblzma/common/block_decoder.c @@ -343,12 +343,7 @@ lzma_block_decoder_init(lzma_next_coder *next, lzma_allocator *allocator, || options->has_backward_size))) return LZMA_PROG_ERROR; - { - const lzma_ret ret = lzma_check_init( - &next->coder->check, options->check); - if (ret != LZMA_OK) - return ret; - } + return_if_error(lzma_check_init(&next->coder->check, options->check)); if (!options->has_eopm && options->uncompressed_size == 0) { if (!is_size_valid(0, options->compressed_size)) @@ -366,16 +361,11 @@ lzma_block_decoder_init(lzma_next_coder *next, lzma_allocator *allocator, next->coder->sequence = SEQ_CODE; } - { - const lzma_ret ret = lzma_raw_decoder_init( - &next->coder->next, allocator, - options->filters, options->has_eopm - ? LZMA_VLI_VALUE_UNKNOWN - : options->uncompressed_size, - true); - if (ret != LZMA_OK) - return ret; - } + return_if_error(lzma_raw_decoder_init(&next->coder->next, allocator, + options->filters, options->has_eopm + ? LZMA_VLI_VALUE_UNKNOWN + : options->uncompressed_size, + true)); next->coder->options = options; next->coder->pos = 0; |