aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/archive_write_add_filter_lz4.c
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive/archive_write_add_filter_lz4.c')
-rw-r--r--libarchive/archive_write_add_filter_lz4.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/libarchive/archive_write_add_filter_lz4.c b/libarchive/archive_write_add_filter_lz4.c
index 15fd494a4197..cf19fadd5633 100644
--- a/libarchive/archive_write_add_filter_lz4.c
+++ b/libarchive/archive_write_add_filter_lz4.c
@@ -223,16 +223,11 @@ static int
archive_filter_lz4_open(struct archive_write_filter *f)
{
struct private_data *data = (struct private_data *)f->data;
- int ret;
size_t required_size;
static size_t const bkmap[] = { 64 * 1024, 256 * 1024, 1 * 1024 * 1024,
4 * 1024 * 1024 };
size_t pre_block_size;
- ret = __archive_write_open_filter(f->next_filter);
- if (ret != 0)
- return (ret);
-
if (data->block_maximum_size < 4)
data->block_size = bkmap[0];
else
@@ -343,7 +338,7 @@ static int
archive_filter_lz4_close(struct archive_write_filter *f)
{
struct private_data *data = (struct private_data *)f->data;
- int ret, r1;
+ int ret;
/* Finish compression cycle. */
ret = (int)lz4_write_one_block(f, NULL, 0);
@@ -366,9 +361,7 @@ archive_filter_lz4_close(struct archive_write_filter *f)
ret = __archive_write_filter(f->next_filter,
data->out_buffer, data->out - data->out_buffer);
}
-
- r1 = __archive_write_close_filter(f->next_filter);
- return (r1 < ret ? r1 : ret);
+ return ret;
}
static int