Eliminate unnecessary, trailing else conditional blocks.

This commit is contained in:
John Hood
2016-11-07 00:43:33 -05:00
parent 43785eb820
commit b1a6f7c144
7 changed files with 38 additions and 50 deletions
+2 -4
View File
@@ -51,9 +51,8 @@ const string LocaleVar::str( void ) const
{
if ( name.empty() ) {
return string( "[no charset variables]" );
} else {
return name + "=" + value;
}
return name + "=" + value;
}
const LocaleVar get_ctype( void )
@@ -65,9 +64,8 @@ const LocaleVar get_ctype( void )
return LocaleVar( "LC_CTYPE", ctype );
} else if ( const char *lang = getenv( "LANG" ) ) {
return LocaleVar( "LANG", lang );
} else {
return LocaleVar( "", "" );
}
return LocaleVar( "", "" );
}
const char *locale_charset( void )
+1 -2
View File
@@ -46,9 +46,8 @@ int swrite( int fd, const char *str, ssize_t len )
if ( bytes_written <= 0 ) {
perror( "write" );
return -1;
} else {
total_bytes_written += bytes_written;
}
total_bytes_written += bytes_written;
}
return 0;