summaryrefslogtreecommitdiffstats
path: root/delete.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-21 06:58:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-21 06:58:44 +0000
commitdbbdc02b322480ee799107d2cfa317533008e6c8 (patch)
treea22c11b459ba27df42ea3427d8b48f7873110104 /delete.cc
parentAdding upstream version 0.23. (diff)
downloadtarlz-dbbdc02b322480ee799107d2cfa317533008e6c8.tar.xz
tarlz-dbbdc02b322480ee799107d2cfa317533008e6c8.zip
Adding upstream version 0.24.upstream/0.24
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'delete.cc')
-rw-r--r--delete.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/delete.cc b/delete.cc
index 6fc58f5..3aeac42 100644
--- a/delete.cc
+++ b/delete.cc
@@ -1,5 +1,5 @@
/* Tarlz - Archiver with multimember lzip compression
- Copyright (C) 2013-2022 Antonio Diaz Diaz.
+ Copyright (C) 2013-2023 Antonio Diaz Diaz.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -20,7 +20,6 @@
#include <cctype>
#include <cerrno>
#include <cstdio>
-#include <cstdlib>
#include <stdint.h> // for lzlib.h
#include <unistd.h>
#include <lzlib.h>
@@ -101,8 +100,8 @@ int delete_members( const Cl_options & cl_opts )
if( !ad.seekable )
{ show_file_error( ad.namep, "Archive is not seekable." ); return 1; }
if( ad.lzip_index.file_size() < 3 * header_size )
- { show_file_error( ad.namep, has_lz_ext( ad.name ) ? posix_lz_msg : posix_msg );
- return 2; }
+ { show_file_error( ad.namep, has_lz_ext( ad.name ) ?
+ posix_lz_msg : posix_msg ); return 2; }
// archive is uncompressed seekable, unless compressed corrupt
Archive_reader ar( ad ); // serial reader
@@ -121,7 +120,7 @@ int delete_members( const Cl_options & cl_opts )
Tar_header header;
if( ( retval = ar.read( header, header_size ) ) != 0 )
{ show_file_error( ad.namep, ar.e_msg(), ar.e_code() ); break; }
- if( !verify_ustar_chksum( header ) ) // error or EOA
+ if( !check_ustar_chksum( header ) ) // error or EOA
{
if( block_is_zero( header, header_size ) ) // EOA
{
@@ -129,7 +128,7 @@ int delete_members( const Cl_options & cl_opts )
{ show_file_error( ad.namep, fv_msg1 ); retval = 2; }
break;
}
- // posix format already verified by archive reader
+ // posix format already checked by archive reader
show_file_error( ad.namep, bad_hdr_msg );
retval = 2; break;
}