From 5a8338a2537d1aca007fee7d5c1927b3a83c2da3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 8 Nov 2015 05:37:59 +0100 Subject: Merging upstream version 1.3~pre2. Signed-off-by: Daniel Baumann --- zupdate.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'zupdate.cc') diff --git a/zupdate.cc b/zupdate.cc index cf488da..2b3244b 100644 --- a/zupdate.cc +++ b/zupdate.cc @@ -136,14 +136,13 @@ struct { const char * from; const char * to; int format_index; } const { ".txz", ".tar", fmt_xz }, { 0, 0, -1 } }; -int disable_xz = -1; // tri-state bool - // Returns 0 for success, -1 for file skipped, 1 for error. int zupdate_file( const std::string & name, const char * const lzip_name, const std::vector< std::string > & lzip_args2, const bool force, const bool keep_input_files ) { + static int disable_xz = -1; // tri-state bool int format_index = -1; std::string dname; // decompressed_name @@ -167,7 +166,7 @@ int zupdate_file( const std::string & name, const char * const lzip_name, } } const char * const compressor_name = get_compressor_name( format_index ); - if( !compressor_name || !compressor_name[0] ) + if( !compressor_name ) { if( verbosity >= 2 ) std::fprintf( stderr, "%s: Unknown extension in file name '%s' -- ignored.\n", @@ -384,7 +383,7 @@ int main( const int argc, const char * const argv[] ) #endif const char * const lzip_name = get_compressor_name( fmt_lz ); - if( !lzip_name || !lzip_name[0] ) + if( !lzip_name ) { show_error( "Missing name of compressor for lzip format." ); return 1; } for( ; argind < parser.arguments(); ++argind ) -- cgit v1.2.3