summaryrefslogtreecommitdiffstats
path: root/file_index.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 15:38:52 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 15:38:52 +0000
commit3a0284b94e3710f0c99b0e1bff2059c524d8ce27 (patch)
tree82746c9058a3749e23d4f86f7d98877cc1765f8b /file_index.cc
parentAdding upstream version 1.2~rc2. (diff)
downloadplzip-3a0284b94e3710f0c99b0e1bff2059c524d8ce27.tar.xz
plzip-3a0284b94e3710f0c99b0e1bff2059c524d8ce27.zip
Adding upstream version 1.2.upstream/1.2
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'file_index.cc')
-rw-r--r--file_index.cc12
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 )