aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/archive_write_add_filter_program.c
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive/archive_write_add_filter_program.c')
-rw-r--r--libarchive/archive_write_add_filter_program.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/libarchive/archive_write_add_filter_program.c b/libarchive/archive_write_add_filter_program.c
index 660f693f29d0..a4bc1d90eda8 100644
--- a/libarchive/archive_write_add_filter_program.c
+++ b/libarchive/archive_write_add_filter_program.c
@@ -212,11 +212,6 @@ __archive_write_program_open(struct archive_write_filter *f,
struct archive_write_program_data *data, const char *cmd)
{
pid_t child;
- int ret;
-
- ret = __archive_write_open_filter(f->next_filter);
- if (ret != ARCHIVE_OK)
- return (ret);
if (data->child_buf == NULL) {
data->child_buf_len = 65536;
@@ -353,11 +348,11 @@ int
__archive_write_program_close(struct archive_write_filter *f,
struct archive_write_program_data *data)
{
- int ret, r1, status;
+ int ret, status;
ssize_t bytes_read;
if (data->child == 0)
- return __archive_write_close_filter(f->next_filter);
+ return ARCHIVE_OK;
ret = 0;
close(data->child_stdin);
@@ -409,7 +404,6 @@ cleanup:
"Error closing program: %s", data->program_name);
ret = ARCHIVE_FATAL;
}
- r1 = __archive_write_close_filter(f->next_filter);
- return (r1 < ret ? r1 : ret);
+ return ret;
}