1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 00:34:04 +00:00

(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

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 );