aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common/block_decoder.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2008-09-13 12:10:43 +0300
committerLasse Collin <lasse.collin@tukaani.org>2008-09-13 12:10:43 +0300
commit13a74b78e37f16c9096ba5fe1859cc04eaa2f9f7 (patch)
treeaa9c137d41bd5d39fa8835cc77cf325ff13a7e7c /src/liblzma/common/block_decoder.c
parentImproved the Stream Flags handling API. (diff)
downloadxz-13a74b78e37f16c9096ba5fe1859cc04eaa2f9f7.tar.xz
Renamed constants:
- LZMA_VLI_VALUE_MAX -> LZMA_VLI_MAX - LZMA_VLI_VALUE_UNKNOWN -> LZMA_VLI_UNKNOWN - LZMA_HEADER_ERRRO -> LZMA_OPTIONS_ERROR
Diffstat (limited to 'src/liblzma/common/block_decoder.c')
-rw-r--r--src/liblzma/common/block_decoder.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/liblzma/common/block_decoder.c b/src/liblzma/common/block_decoder.c
index 9eb33651..f9101c7d 100644
--- a/src/liblzma/common/block_decoder.c
+++ b/src/liblzma/common/block_decoder.c
@@ -58,8 +58,8 @@ struct lzma_coder_s {
static inline bool
update_size(lzma_vli *size, lzma_vli add, lzma_vli limit)
{
- if (limit > LZMA_VLI_VALUE_MAX)
- limit = LZMA_VLI_VALUE_MAX;
+ if (limit > LZMA_VLI_MAX)
+ limit = LZMA_VLI_MAX;
if (limit < *size || limit - *size < add)
return true;
@@ -73,7 +73,7 @@ update_size(lzma_vli *size, lzma_vli add, lzma_vli limit)
static inline bool
is_size_valid(lzma_vli size, lzma_vli reference)
{
- return reference == LZMA_VLI_VALUE_UNKNOWN || reference == size;
+ return reference == LZMA_VLI_UNKNOWN || reference == size;
}
@@ -96,7 +96,7 @@ block_decode(lzma_coder *coder, lzma_allocator *allocator,
const size_t out_used = *out_pos - out_start;
// NOTE: We compare to compressed_limit here, which prevents
- // the total size of the Block growing past LZMA_VLI_VALUE_MAX.
+ // the total size of the Block growing past LZMA_VLI_MAX.
if (update_size(&coder->compressed_size, in_used,
coder->compressed_limit)
|| update_size(&coder->uncompressed_size,
@@ -224,8 +224,8 @@ lzma_block_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
// value so that Total Size of the Block still is a valid VLI and
// a multiple of four.
next->coder->compressed_limit
- = options->compressed_size == LZMA_VLI_VALUE_UNKNOWN
- ? (LZMA_VLI_VALUE_MAX & ~LZMA_VLI_C(3))
+ = options->compressed_size == LZMA_VLI_UNKNOWN
+ ? (LZMA_VLI_MAX & ~LZMA_VLI_C(3))
- options->header_size
- lzma_check_size(options->check)
: options->compressed_size;