mirror of
https://git.tukaani.org/xz.git
synced 2024-04-04 12:36:23 +02:00
liblzma: Index hash: Change return value type of hash_append() to void.
This commit is contained in:
parent
20e7a33e2d
commit
ddbc6f58c2
1 changed files with 5 additions and 6 deletions
|
@ -122,7 +122,7 @@ lzma_index_hash_size(const lzma_index_hash *index_hash)
|
||||||
|
|
||||||
|
|
||||||
/// Updates the sizes and the hash without any validation.
|
/// Updates the sizes and the hash without any validation.
|
||||||
static lzma_ret
|
static void
|
||||||
hash_append(lzma_index_hash_info *info, lzma_vli unpadded_size,
|
hash_append(lzma_index_hash_info *info, lzma_vli unpadded_size,
|
||||||
lzma_vli uncompressed_size)
|
lzma_vli uncompressed_size)
|
||||||
{
|
{
|
||||||
|
@ -136,7 +136,7 @@ hash_append(lzma_index_hash_info *info, lzma_vli unpadded_size,
|
||||||
lzma_check_update(&info->check, LZMA_CHECK_BEST,
|
lzma_check_update(&info->check, LZMA_CHECK_BEST,
|
||||||
(const uint8_t *)(sizes), sizeof(sizes));
|
(const uint8_t *)(sizes), sizeof(sizes));
|
||||||
|
|
||||||
return LZMA_OK;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -152,8 +152,7 @@ lzma_index_hash_append(lzma_index_hash *index_hash, lzma_vli unpadded_size,
|
||||||
return LZMA_PROG_ERROR;
|
return LZMA_PROG_ERROR;
|
||||||
|
|
||||||
// Update the hash.
|
// Update the hash.
|
||||||
return_if_error(hash_append(&index_hash->blocks,
|
hash_append(&index_hash->blocks, unpadded_size, uncompressed_size);
|
||||||
unpadded_size, uncompressed_size));
|
|
||||||
|
|
||||||
// Validate the properties of *info are still in allowed limits.
|
// Validate the properties of *info are still in allowed limits.
|
||||||
if (index_hash->blocks.blocks_size > LZMA_VLI_MAX
|
if (index_hash->blocks.blocks_size > LZMA_VLI_MAX
|
||||||
|
@ -239,9 +238,9 @@ lzma_index_hash_decode(lzma_index_hash *index_hash, const uint8_t *in,
|
||||||
index_hash->sequence = SEQ_UNCOMPRESSED;
|
index_hash->sequence = SEQ_UNCOMPRESSED;
|
||||||
} else {
|
} else {
|
||||||
// Update the hash.
|
// Update the hash.
|
||||||
return_if_error(hash_append(&index_hash->records,
|
hash_append(&index_hash->records,
|
||||||
index_hash->unpadded_size,
|
index_hash->unpadded_size,
|
||||||
index_hash->uncompressed_size));
|
index_hash->uncompressed_size);
|
||||||
|
|
||||||
// Verify that we don't go over the known sizes. Note
|
// Verify that we don't go over the known sizes. Note
|
||||||
// that this validation is simpler than the one used
|
// that this validation is simpler than the one used
|
||||||
|
|
Loading…
Reference in a new issue