Ignore:
Timestamp:
Apr 18, 2008, 11:17:40 PM (13 years ago)
Author:
charles
Message:

minor code cleanup: remove dead code, const-correctness, etc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/platform.c

    r5642 r5645  
    162162}
    163163   
    164 void
    165 tr_threadJoin( tr_thread * t )
    166 {
    167     if( t != NULL )
    168     {
    169 #ifdef __BEOS__
    170         long exit;
    171         wait_for_thread( t->thread, &exit );
    172 #elif defined(WIN32)
    173         WaitForSingleObject( t->thread_handle, INFINITE );
    174         CloseHandle( t->thread_handle );
    175 #else
    176         pthread_join( t->thread, NULL );
    177 #endif
    178 
    179         tr_dbg( "Thread '%s' joined", t->name );
    180         t->name = NULL;
    181         t->func = NULL;
    182         tr_free( t );
    183     }
    184 }
    185 
    186164/***
    187165****  LOCKS
     
    211189    l->lock = create_sem( 1, "" );
    212190#elif defined(WIN32)
    213     InitializeCriticalSection( &l->lock ); /* critical sections support recursion */
     191    InitializeCriticalSection( &l->lock ); /* supports recursion */
    214192#else
    215193    pthread_mutexattr_t attr;
     
    301279#else
    302280            struct passwd * pw = getpwuid( getuid() );
    303             endpwent( );
    304281            if( pw )
    305282                home = tr_strdup( pw->pw_dir );
     283            endpwent( );
    306284#endif
    307285        }
Note: See TracChangeset for help on using the changeset viewer.