summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libarchive/archive_write_add_filter_xz.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libarchive/archive_write_add_filter_xz.c b/libarchive/archive_write_add_filter_xz.c
index 83cdb635..d9bea6a3 100644
--- a/libarchive/archive_write_add_filter_xz.c
+++ b/libarchive/archive_write_add_filter_xz.c
@@ -165,9 +165,10 @@ static int
archive_compressor_xz_init_stream(struct archive_write_filter *f,
struct private_data *data)
{
+ static const lzma_stream lzma_stram_init = LZMA_STREAM_INIT;
int ret;
- data->stream = (lzma_stream)LZMA_STREAM_INIT;
+ data->stream = lzma_stram_init;
data->stream.next_out = data->compressed;
data->stream.avail_out = data->compressed_buffer_size;
if (f->code == ARCHIVE_COMPRESSION_XZ)