summaryrefslogtreecommitdiffstats
path: root/alone_to_lz.cc
diff options
context:
space:
mode:
Diffstat (limited to 'alone_to_lz.cc')
-rw-r--r--alone_to_lz.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/alone_to_lz.cc b/alone_to_lz.cc
index c71f335..ff1f92f 100644
--- a/alone_to_lz.cc
+++ b/alone_to_lz.cc
@@ -52,7 +52,7 @@ uint8_t * read_file( const int infd, long * const file_sizep,
if( buffer_size >= LONG_MAX )
{ show_file_error( filename, large_file_msg );
std::free( buffer ); return 0; }
- buffer_size = ( buffer_size <= LONG_MAX / 2 ) ? 2 * buffer_size : LONG_MAX;
+ buffer_size = (buffer_size <= LONG_MAX / 2) ? 2 * buffer_size : LONG_MAX;
uint8_t * const tmp = (uint8_t *)std::realloc( buffer, buffer_size );
if( !tmp ) { std::free( buffer ); throw std::bad_alloc(); }
buffer = tmp;
@@ -143,8 +143,8 @@ int alone_to_lz( const int infd, const Pretty_print & pp )
{ pp( "conversion failed" ); std::free( buffer ); return 2; }
if( writeblock( outfd, buffer + offset, lzip_size ) != lzip_size )
{
- show_error( "Error writing output file", errno );
- std::free( buffer ); return 1;
+ show_file_error( printable_name( output_filename, false ), write_error_msg,
+ errno ); std::free( buffer ); return 1;
}
std::free( buffer );
if( verbosity >= 1 ) std::fputs( "done\n", stderr );