mirror of
https://git.tukaani.org/xz.git
synced 2024-04-04 12:36:23 +02:00
liblzma: Avoid unneeded use of void pointer in LZMA decoder.
This commit is contained in:
parent
218394958c
commit
9a304bf1e4
2 changed files with 2 additions and 3 deletions
|
@ -986,7 +986,7 @@ lzma_decoder_reset(void *coder_ptr, const void *opt)
|
||||||
|
|
||||||
extern lzma_ret
|
extern lzma_ret
|
||||||
lzma_lzma_decoder_create(lzma_lz_decoder *lz, const lzma_allocator *allocator,
|
lzma_lzma_decoder_create(lzma_lz_decoder *lz, const lzma_allocator *allocator,
|
||||||
const void *opt, lzma_lz_options *lz_options)
|
const lzma_options_lzma *options, lzma_lz_options *lz_options)
|
||||||
{
|
{
|
||||||
if (lz->coder == NULL) {
|
if (lz->coder == NULL) {
|
||||||
lz->coder = lzma_alloc(sizeof(lzma_lzma1_decoder), allocator);
|
lz->coder = lzma_alloc(sizeof(lzma_lzma1_decoder), allocator);
|
||||||
|
@ -1000,7 +1000,6 @@ lzma_lzma_decoder_create(lzma_lz_decoder *lz, const lzma_allocator *allocator,
|
||||||
|
|
||||||
// All dictionary sizes are OK here. LZ decoder will take care of
|
// All dictionary sizes are OK here. LZ decoder will take care of
|
||||||
// the special cases.
|
// the special cases.
|
||||||
const lzma_options_lzma *options = opt;
|
|
||||||
lz_options->dict_size = options->dict_size;
|
lz_options->dict_size = options->dict_size;
|
||||||
lz_options->preset_dict = options->preset_dict;
|
lz_options->preset_dict = options->preset_dict;
|
||||||
lz_options->preset_dict_size = options->preset_dict_size;
|
lz_options->preset_dict_size = options->preset_dict_size;
|
||||||
|
|
|
@ -42,7 +42,7 @@ extern bool lzma_lzma_lclppb_decode(
|
||||||
/// LZMA2 decoders.
|
/// LZMA2 decoders.
|
||||||
extern lzma_ret lzma_lzma_decoder_create(
|
extern lzma_ret lzma_lzma_decoder_create(
|
||||||
lzma_lz_decoder *lz, const lzma_allocator *allocator,
|
lzma_lz_decoder *lz, const lzma_allocator *allocator,
|
||||||
const void *opt, lzma_lz_options *lz_options);
|
const lzma_options_lzma *opt, lzma_lz_options *lz_options);
|
||||||
|
|
||||||
/// Gets memory usage without validating lc/lp/pb. This is used by LZMA2
|
/// Gets memory usage without validating lc/lp/pb. This is used by LZMA2
|
||||||
/// decoder, because raw LZMA2 decoding doesn't need lc/lp/pb.
|
/// decoder, because raw LZMA2 decoding doesn't need lc/lp/pb.
|
||||||
|
|
Loading…
Reference in a new issue