Cleanup unused code.

This commit is contained in:
Con Kolivas 2022-02-27 17:27:45 +11:00
parent 09ceb85afa
commit ec54339be6
5 changed files with 3 additions and 18 deletions

View file

@ -858,7 +858,7 @@ bool decompress_file(rzip_control *control)
print_progress("Decompressing...\n"); 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); clear_rulist(control);
return false; return false;
} }

View file

@ -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 /* Decompress an open file. Call fatal_return(() on error
return the number of bytes that have been retrieved 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]; uchar md5_stored[MD5_DIGEST_SIZE];
struct timeval start,end; struct timeval start,end;

View file

@ -23,6 +23,6 @@
#include "lrzip_private.h" #include "lrzip_private.h"
void clear_rulist(rzip_control *control); 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 #endif

14
rzip.c
View file

@ -1254,17 +1254,3 @@ retry:
clear_sslist(st); clear_sslist(st);
dealloc(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);
}

1
rzip.h
View file

@ -22,6 +22,5 @@
#include "lrzip_private.h" #include "lrzip_private.h"
void rzip_fd(rzip_control *control, int fd_in, int fd_out); void rzip_fd(rzip_control *control, int fd_in, int fd_out);
void rzip_control_free(rzip_control *control);
#endif #endif