summaryrefslogtreecommitdiffstats
path: root/split.cc
diff options
context:
space:
mode:
Diffstat (limited to 'split.cc')
-rw-r--r--split.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/split.cc b/split.cc
index ac7627d..bec8a26 100644
--- a/split.cc
+++ b/split.cc
@@ -90,7 +90,7 @@ int do_split_file( const std::string & input_filename, uint8_t * & base_buffer,
const int verbosity, const bool force )
{
const int hsize = File_header::size;
- const int tsize = File_trailer::size();
+ const int tsize = File_trailer::size;
const int buffer_size = 65536;
const int base_buffer_size = tsize + buffer_size + hsize;
base_buffer = new uint8_t[base_buffer_size];
@@ -99,7 +99,8 @@ int do_split_file( const std::string & input_filename, uint8_t * & base_buffer,
struct stat in_stats;
const int infd = open_instream( input_filename, &in_stats, true, true );
if( infd < 0 ) return 1;
- File_index file_index( infd );
+ const File_index file_index( infd );
+ if( file_index.retval() != 0 ) show_error( file_index.error().c_str() );
const int max_members = ( file_index.retval() ? 999999 : file_index.members() );
int max_digits = 1;
for( int i = max_members; i >= 10; i /= 10 ) ++max_digits;