summaryrefslogtreecommitdiffstats
path: root/zcat.cc
diff options
context:
space:
mode:
Diffstat (limited to 'zcat.cc')
-rw-r--r--zcat.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/zcat.cc b/zcat.cc
index f813bbe..1ead9f4 100644
--- a/zcat.cc
+++ b/zcat.cc
@@ -45,7 +45,7 @@ public:
str[i] = '0';
}
if( first_digit_pos > 0 ) str[--first_digit_pos] = '1';
- else str.insert( 0, 1, '1' );
+ else str.insert( 0U, 1, '1' );
}
int sprint( uint8_t * const buf )
@@ -116,10 +116,7 @@ int do_cat( const int infd, const int buffer_size,
rd = readblock( infd, inbuf, buffer_size );
if( rd != buffer_size && errno )
{
- if( verbosity >= 0 )
- std::fprintf( stderr, "%s: Error reading file `%s': %s.\n",
- util_name, input_filename.c_str(),
- std::strerror( errno ) );
+ show_error2( "Error reading file", input_filename.c_str() );
return 1;
}
if( rd == 0 )
@@ -206,7 +203,7 @@ int cat( int infd, const std::string & input_filename,
input_filename, cat_options );
if( pid && wait_for_child( pid, "data feeder" ) != 0 ) retval = 1;
if( close( infd ) != 0 )
- { show_error( "Can't close output of data feeder", errno ); retval = 1; }
+ { show_close_error( "data feeder" ); retval = 1; }
}
delete[] inbuf; delete[] outbuf;
return retval;