mirror of
https://github.com/transmission/transmission.git
synced 2025-12-26 13:21:44 +00:00
make tr_torrentStat() const.
malloc, rather than calloc, the buffer in strndup.
This commit is contained in:
@@ -399,10 +399,12 @@ char*
|
||||
tr_strndup( const char * in, int len )
|
||||
{
|
||||
char * out = NULL;
|
||||
|
||||
if( in != NULL )
|
||||
{
|
||||
out = tr_calloc( len+1, 1 );
|
||||
out = tr_malloc( len+1 );
|
||||
memcpy( out, in, len );
|
||||
out[len] = '\0';
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user