remove an unneeded static variable
This commit is contained in:
parent
8214c797c6
commit
2021706c6e
|
@ -76,18 +76,12 @@ tr_timeUpdate( time_t now )
|
||||||
void
|
void
|
||||||
tr_msgInit( void )
|
tr_msgInit( void )
|
||||||
{
|
{
|
||||||
static tr_bool initialized = FALSE;
|
const char * env = getenv( "TR_DEBUG" );
|
||||||
|
|
||||||
if( !initialized )
|
|
||||||
{
|
|
||||||
char * env = getenv( "TR_DEBUG" );
|
|
||||||
messageLevel = ( env ? atoi( env ) : 0 ) + 1;
|
messageLevel = ( env ? atoi( env ) : 0 ) + 1;
|
||||||
messageLevel = MAX( 1, messageLevel );
|
messageLevel = MAX( 1, messageLevel );
|
||||||
|
|
||||||
|
if( messageLock == NULL )
|
||||||
messageLock = tr_lockNew( );
|
messageLock = tr_lockNew( );
|
||||||
|
|
||||||
initialized = TRUE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FILE*
|
FILE*
|
||||||
|
|
Loading…
Reference in New Issue