(trunk libT) fix never-executed code branch detected by clang static analyzer
This commit is contained in:
parent
c16406bf7c
commit
a680c4b6cb
|
@ -172,9 +172,9 @@ strlmem( char * buf, int64_t bytes, size_t buflen )
|
||||||
static char*
|
static char*
|
||||||
strlsize( char * buf, int64_t bytes, size_t buflen )
|
strlsize( char * buf, int64_t bytes, size_t buflen )
|
||||||
{
|
{
|
||||||
if( bytes < 1 )
|
if( bytes < 0 )
|
||||||
tr_strlcpy( buf, "Unknown", buflen );
|
tr_strlcpy( buf, "Unknown", buflen );
|
||||||
else if( !bytes )
|
else if( bytes == 0 )
|
||||||
tr_strlcpy( buf, "None", buflen );
|
tr_strlcpy( buf, "None", buflen );
|
||||||
else
|
else
|
||||||
tr_formatter_size_B( buf, bytes, buflen );
|
tr_formatter_size_B( buf, bytes, buflen );
|
||||||
|
|
Loading…
Reference in New Issue