aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/lz/lz_decoder.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2010-05-26 10:36:46 +0300
committerLasse Collin <lasse.collin@tukaani.org>2010-05-26 10:36:46 +0300
commit920a69a8d8e4203c5edddd829d932130eac188ea (patch)
treee1478b0896e839202014fe63b97876740d7f9f5f /src/liblzma/lz/lz_decoder.c
parentFix compilation of debug/known_sizes.c. (diff)
downloadxz-920a69a8d8e4203c5edddd829d932130eac188ea.tar.xz
Rename MIN() and MAX() to my_min() and my_max().
This should avoid some minor portability issues.
Diffstat (limited to 'src/liblzma/lz/lz_decoder.c')
-rw-r--r--src/liblzma/lz/lz_decoder.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/liblzma/lz/lz_decoder.c b/src/liblzma/lz/lz_decoder.c
index 350b1f89..2c573551 100644
--- a/src/liblzma/lz/lz_decoder.c
+++ b/src/liblzma/lz/lz_decoder.c
@@ -81,8 +81,9 @@ decode_buffer(lzma_coder *coder,
// It must not decode past the end of the dictionary
// buffer, and we don't want it to decode more than is
// actually needed to fill the out[] buffer.
- coder->dict.limit = coder->dict.pos + MIN(out_size - *out_pos,
- coder->dict.size - coder->dict.pos);
+ coder->dict.limit = coder->dict.pos
+ + my_min(out_size - *out_pos,
+ coder->dict.size - coder->dict.pos);
// Call the coder->lz.code() to do the actual decoding.
const lzma_ret ret = coder->lz.code(
@@ -264,7 +265,7 @@ lzma_lz_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
&& lz_options.preset_dict_size > 0) {
// If the preset dictionary is bigger than the actual
// dictionary, copy only the tail.
- const size_t copy_size = MIN(lz_options.preset_dict_size,
+ const size_t copy_size = my_min(lz_options.preset_dict_size,
lz_options.dict_size);
const size_t offset = lz_options.preset_dict_size - copy_size;
memcpy(next->coder->dict.buf, lz_options.preset_dict + offset,