diff options
Diffstat (limited to '')
-rw-r--r-- | file_index.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/file_index.cc b/file_index.cc index a99ea27..1a46277 100644 --- a/file_index.cc +++ b/file_index.cc @@ -1,5 +1,5 @@ /* Plzip - Parallel compressor compatible with lzip - Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Antonio Diaz Diaz. + Copyright (C) 2009-2014 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 @@ -59,7 +59,7 @@ File_index::File_index( const int infd ) { const long long isize = lseek( infd, 0, SEEK_END ); if( isize < 0 ) - { set_errno_error( "Input file is not seekable :" ); return; } + { set_errno_error( "Input file is not seekable: " ); return; } if( isize < min_member_size ) { error_ = "Input file is too short."; retval_ = 2; return; } if( isize > INT64_MAX ) @@ -68,7 +68,7 @@ File_index::File_index( const int infd ) File_header header; if( seek_read( infd, header.data, File_header::size, 0 ) != File_header::size ) - { set_errno_error( "Error reading member header :" ); return; } + { set_errno_error( "Error reading member header: " ); return; } if( !header.verify_magic() ) { error_ = "Bad magic number (file not in lzip format)."; retval_ = 2; return; } @@ -82,7 +82,7 @@ File_index::File_index( const int infd ) File_trailer trailer; if( seek_read( infd, trailer.data, File_trailer::size, pos - File_trailer::size ) != File_trailer::size ) - { set_errno_error( "Error reading member trailer :" ); break; } + { set_errno_error( "Error reading member trailer: " ); break; } const long long member_size = trailer.member_size(); if( member_size < min_member_size || member_size > pos ) { @@ -93,7 +93,7 @@ File_index::File_index( const int infd ) } if( seek_read( infd, header.data, File_header::size, pos - member_size ) != File_header::size ) - { set_errno_error( "Error reading member header :" ); break; } + { set_errno_error( "Error reading member header: " ); break; } if( !header.verify_magic() || !header.verify_version() ) { if( member_vector.empty() ) // maybe trailing garbage @@ -119,7 +119,7 @@ File_index::File_index( const int infd ) return; } std::reverse( member_vector.begin(), member_vector.end() ); - for( unsigned i = 0; i < member_vector.size() - 1; ++i ) + for( unsigned long i = 0; i < member_vector.size() - 1; ++i ) { const long long end = member_vector[i].dblock.end(); if( end < 0 || end > INT64_MAX ) |