Changeset 7641


Ignore:
Timestamp:
Jan 8, 2009, 4:43:00 AM (12 years ago)
Author:
charles
Message:

(trunk libT) remove a small number of redundant or unnecessary asserts

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-io.c

    r7622 r7641  
    173173        && ( io->refCount > 0 )
    174174        && ( tr_isBandwidth( &io->bandwidth ) )
    175         && ( tr_isAddress( &io->addr ) )
    176         && ( tr_isBool( io->isEncrypted ) )
    177         && ( tr_isBool( io->isIncoming ) )
    178         && ( tr_isBool( io->peerIdIsSet ) )
    179         && ( tr_isBool( io->extendedProtocolSupported ) )
    180         && ( tr_isBool( io->fastExtensionSupported ) );
     175        && ( tr_isAddress( &io->addr ) );
    181176}
    182177
     
    842837event_enable( tr_peerIo * io, short event )
    843838{
    844     assert( tr_isPeerIo( io ) );
    845 
    846839    if( event & EV_READ )
    847840        event_add( &io->event_read, NULL );
     
    854847event_disable( struct tr_peerIo * io, short event )
    855848{
    856     assert( tr_isPeerIo( io ) );
    857 
    858849    if( event & EV_READ )
    859850        event_del( &io->event_read );
     
    869860                     tr_bool        isEnabled )
    870861{
    871     short event;
     862    const short event = dir == TR_UP ? EV_WRITE : EV_READ;
    872863
    873864    assert( tr_isPeerIo( io ) );
    874865    assert( tr_isDirection( dir ) );
    875 
    876     event = dir == TR_UP ? EV_WRITE : EV_READ;
    877866
    878867    if( isEnabled )
  • trunk/libtransmission/utils.h

    r7632 r7641  
    301301static inline char* tr_strdup( const void * in )
    302302{
    303     return tr_strndup( in, in ? strlen( (const char*)in ) : 0 );
     303    return tr_strndup( in, in ? strlen( in ) : 0 );
    304304}
    305305
Note: See TracChangeset for help on using the changeset viewer.