(trunk libT) tweaks by werehamster

This commit is contained in:
Jordan Lee 2011-03-13 05:45:34 +00:00
parent 5ad95ee3d5
commit 7a24257d00
3 changed files with 4 additions and 9 deletions

View File

@ -162,9 +162,7 @@ tr_metaInfoBuilderCreate( const char * topFile )
builderFileCompare );
ret->pieceSize = bestPieceSize( ret->totalSize );
ret->pieceCount = ret->pieceSize
? (int)( ret->totalSize / ret->pieceSize )
: 0;
ret->pieceCount = (int)( ret->totalSize / ret->pieceSize );
if( ret->totalSize % ret->pieceSize )
++ret->pieceCount;

View File

@ -1133,11 +1133,9 @@ gotNewBlocklist( tr_session * session,
errno = 0;
if( !errno ) {
fd = tr_open_file_for_writing( filename );
if( fd < 0 )
tr_snprintf( result, sizeof( result ), _( "Couldn't save file \"%1$s\": %2$s" ), filename, tr_strerror( errno ) );
}
fd = tr_open_file_for_writing( filename );
if( fd < 0 )
tr_snprintf( result, sizeof( result ), _( "Couldn't save file \"%1$s\": %2$s" ), filename, tr_strerror( errno ) );
if( !errno ) {
const char * buf = response;

View File

@ -1361,7 +1361,6 @@ parseNumberSection( const char * str, int len, struct number_range * setme )
if( errno || ( end == tmp ) ) {
success = FALSE;
} else if( *end != '-' ) {
b = a;
success = TRUE;
} else {
const char * pch = end + 1;