diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2012-07-17 18:19:59 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2012-07-17 18:19:59 +0300 |
commit | 3778db1be53e61ff285c573af5ee468803008456 (patch) | |
tree | 1ee980d695880a3c9195fbb7caaae6dbc97d3b5e /src/liblzma/common/block_header_decoder.c | |
parent | Tests: Remove tests/test_block.c that had gotten committed accidentally. (diff) | |
download | xz-3778db1be53e61ff285c573af5ee468803008456.tar.xz |
liblzma: Make the use of lzma_allocator const-correct.
There is a tiny risk of causing breakage: If an application
assigns lzma_stream.allocator to a non-const pointer, such
code won't compile anymore. I don't know why anyone would do
such a thing though, so in practice this shouldn't cause trouble.
Thanks to Jan Kratochvil for the patch.
Diffstat (limited to 'src/liblzma/common/block_header_decoder.c')
-rw-r--r-- | src/liblzma/common/block_header_decoder.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liblzma/common/block_header_decoder.c b/src/liblzma/common/block_header_decoder.c index 2c9573ee..416642cd 100644 --- a/src/liblzma/common/block_header_decoder.c +++ b/src/liblzma/common/block_header_decoder.c @@ -15,7 +15,7 @@ static void -free_properties(lzma_block *block, lzma_allocator *allocator) +free_properties(lzma_block *block, const lzma_allocator *allocator) { // Free allocated filter options. The last array member is not // touched after the initialization in the beginning of @@ -32,7 +32,7 @@ free_properties(lzma_block *block, lzma_allocator *allocator) extern LZMA_API(lzma_ret) lzma_block_header_decode(lzma_block *block, - lzma_allocator *allocator, const uint8_t *in) + const lzma_allocator *allocator, const uint8_t *in) { // NOTE: We consider the header to be corrupt not only when the // CRC32 doesn't match, but also when variable-length integers |