Ignore:
Timestamp:
Nov 27, 2009, 6:13:36 PM (12 years ago)
Author:
livings124
Message:

remove an unneeded static variable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/utils.c

    r9608 r9609  
    7777tr_msgInit( void )
    7878{
    79     static tr_bool initialized = FALSE;
    80 
    81     if( !initialized )
    82     {
    83         char * env = getenv( "TR_DEBUG" );
    84         messageLevel = ( env ? atoi( env ) : 0 ) + 1;
    85         messageLevel = MAX( 1, messageLevel );
    86 
     79    const char * env = getenv( "TR_DEBUG" );
     80    messageLevel = ( env ? atoi( env ) : 0 ) + 1;
     81    messageLevel = MAX( 1, messageLevel );
     82
     83    if( messageLock == NULL )
    8784        messageLock = tr_lockNew( );
    88 
    89         initialized = TRUE;
    90     }
    9185}
    9286
Note: See TracChangeset for help on using the changeset viewer.