(trunk libT) fix never-executed code branch detected by clang static analyzer

This commit is contained in:
Jordan Lee 2011-03-31 05:06:19 +00:00
parent c16406bf7c
commit a680c4b6cb
1 changed files with 2 additions and 2 deletions

View File

@ -172,9 +172,9 @@ strlmem( char * buf, int64_t bytes, size_t buflen )
static char*
strlsize( char * buf, int64_t bytes, size_t buflen )
{
if( bytes < 1 )
if( bytes < 0 )
tr_strlcpy( buf, "Unknown", buflen );
else if( !bytes )
else if( bytes == 0 )
tr_strlcpy( buf, "None", buflen );
else
tr_formatter_size_B( buf, bytes, buflen );