From ec54339be6787d3e8df44f23148d9eadca5cd9a9 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 27 Feb 2022 17:27:45 +1100 Subject: [PATCH] Cleanup unused code. --- lrzip.c | 2 +- runzip.c | 2 +- runzip.h | 2 +- rzip.c | 14 -------------- rzip.h | 1 - 5 files changed, 3 insertions(+), 18 deletions(-) diff --git a/lrzip.c b/lrzip.c index 554551c..69fec18 100644 --- a/lrzip.c +++ b/lrzip.c @@ -858,7 +858,7 @@ bool decompress_file(rzip_control *control) print_progress("Decompressing...\n"); - if (unlikely(runzip_fd(control, fd_in, fd_out, fd_hist, expected_size) < 0)) { + if (unlikely(runzip_fd(control, fd_in, fd_hist, expected_size) < 0)) { clear_rulist(control); return false; } diff --git a/runzip.c b/runzip.c index a3b249a..36ecee9 100644 --- a/runzip.c +++ b/runzip.c @@ -387,7 +387,7 @@ static i64 runzip_chunk(rzip_control *control, int fd_in, i64 expected_size, i64 /* Decompress an open file. Call fatal_return(() on error return the number of bytes that have been retrieved */ -i64 runzip_fd(rzip_control *control, int fd_in, int fd_out, int fd_hist, i64 expected_size) +i64 runzip_fd(rzip_control *control, int fd_in, int fd_hist, i64 expected_size) { uchar md5_stored[MD5_DIGEST_SIZE]; struct timeval start,end; diff --git a/runzip.h b/runzip.h index 310d018..a275bd3 100644 --- a/runzip.h +++ b/runzip.h @@ -23,6 +23,6 @@ #include "lrzip_private.h" void clear_rulist(rzip_control *control); -i64 runzip_fd(rzip_control *control, int fd_in, int fd_out, int fd_hist, i64 expected_size); +i64 runzip_fd(rzip_control *control, int fd_in, int fd_hist, i64 expected_size); #endif diff --git a/rzip.c b/rzip.c index a7068b8..ba7998b 100644 --- a/rzip.c +++ b/rzip.c @@ -1254,17 +1254,3 @@ retry: clear_sslist(st); dealloc(st); } - -void rzip_control_free(rzip_control *control) -{ - if (!control) - return; - - dealloc(control->tmpdir); - dealloc(control->outname); - dealloc(control->outdir); - if (control->suffix && control->suffix[0]) - dealloc(control->suffix); - - dealloc(control); -} diff --git a/rzip.h b/rzip.h index 3f75ea9..e3b0129 100644 --- a/rzip.h +++ b/rzip.h @@ -22,6 +22,5 @@ #include "lrzip_private.h" void rzip_fd(rzip_control *control, int fd_in, int fd_out); -void rzip_control_free(rzip_control *control); #endif