From 92e2c77a5b5eeabc3252ea90953ab6bd1a8944d1 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Wed, 8 Feb 2023 14:08:34 +0100 Subject: libtar: remove need for skip_padding function In the istream implementation, automatically skip the padding when we reach end-of-file. Also skip file AND padding when we destroy the object. Replace the remaining instances with a simple istream_skip instead and remove the wrapper from libtar. Signed-off-by: David Oberhollenzer --- bin/tar2sqfs/src/process_tarball.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'bin/tar2sqfs/src') diff --git a/bin/tar2sqfs/src/process_tarball.c b/bin/tar2sqfs/src/process_tarball.c index fa1181f..a4d5500 100644 --- a/bin/tar2sqfs/src/process_tarball.c +++ b/bin/tar2sqfs/src/process_tarball.c @@ -35,11 +35,7 @@ static int write_file(istream_t *input_file, sqfs_writer_t *sqfs, ostream_flush(out); sqfs_drop(out); sqfs_drop(in); - - if (ret) - return -1; - - return skip_padding(input_file, hdr->record_size); + return ret; } static int copy_xattr(sqfs_writer_t *sqfs, tree_node_t *node, -- cgit v1.2.3