aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common/stream_encoder_single.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/liblzma/common/stream_encoder_single.c')
-rw-r--r--src/liblzma/common/stream_encoder_single.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/liblzma/common/stream_encoder_single.c b/src/liblzma/common/stream_encoder_single.c
index e8efd004..cd835dcb 100644
--- a/src/liblzma/common/stream_encoder_single.c
+++ b/src/liblzma/common/stream_encoder_single.c
@@ -71,7 +71,7 @@ stream_encode(lzma_coder *coder, lzma_allocator *allocator,
break;
case SEQ_DATA: {
- lzma_ret ret = coder->block_encoder.code(
+ const lzma_ret ret = coder->block_encoder.code(
coder->block_encoder.coder, allocator,
in, in_pos, in_size,
out, out_pos, out_size, action);
@@ -83,10 +83,8 @@ stream_encode(lzma_coder *coder, lzma_allocator *allocator,
assert(coder->header_size >= LZMA_STREAM_TAIL_SIZE);
coder->header_size = LZMA_STREAM_TAIL_SIZE;
- ret = lzma_stream_tail_encode(
- coder->header, &coder->stream_flags);
- if (ret != LZMA_OK)
- return ret;
+ return_if_error(lzma_stream_tail_encode(
+ coder->header, &coder->stream_flags));
coder->sequence = SEQ_FOOTER;
break;