aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common/stream_encoder_single.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2007-12-09 17:06:45 +0200
committerLasse Collin <lasse.collin@tukaani.org>2007-12-09 17:06:45 +0200
commit07ac881779a8477f2c1ab112b91a129e24aa743c (patch)
treefe7f62c63b22b5942c4556ff56125cd0330129e2 /src/liblzma/common/stream_encoder_single.c
parentAdded a bunch of .lzma test files. (diff)
downloadxz-07ac881779a8477f2c1ab112b91a129e24aa743c.tar.xz
Take advantage of return_if_error() macro in more places.
Cleaned Subblock filter's initialization code too.
Diffstat (limited to '')
-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;