Ignore:
Timestamp:
Aug 1, 2008, 4:43:22 PM (13 years ago)
Author:
charles
Message:

minor text cleanup

File:
1 edited

Legend:

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

    r6415 r6425  
    8181{
    8282    tr_peerIo * c = (tr_peerIo *) userData;
    83     if( c->didWrite != NULL )
    84         (*c->didWrite)( e, c->userData );
     83    if( c->didWrite )
     84        c->didWrite( e, c->userData );
    8585}
    8686
     
    9999    while( !done )
    100100    {
    101         const int ret = (*c->canRead)( e, c->userData );
     101        const int ret = c->canRead( e, c->userData );
    102102
    103103        switch( ret )
     
    119119{
    120120    tr_peerIo * c = userData;
    121     if( c->gotError != NULL )
    122         (*c->gotError)( e, what, c->userData );
     121    if( c->gotError )
     122        c->gotError( e, what, c->userData );
    123123}
    124124
     
    169169                      int                     socket )
    170170{
    171     assert( handle != NULL );
    172     assert( in_addr != NULL );
     171    assert( handle );
     172    assert( in_addr );
    173173    assert( socket >= 0 );
    174174
     
    186186    int socket;
    187187
    188     assert( handle != NULL );
    189     assert( in_addr != NULL );
     188    assert( handle );
     189    assert( in_addr );
    190190    assert( port >= 0 );
    191     assert( torrentHash != NULL );
     191    assert( torrentHash );
    192192
    193193    socket = tr_netOpenTCP( in_addr, port, 0 );
     
    212212tr_peerIoFree( tr_peerIo * io )
    213213{
    214     if( io != NULL )
     214    if( io )
    215215    {
    216216        io->canRead = NULL;
     
    224224tr_peerIoGetHandle( tr_peerIo * io )
    225225{
    226     assert( io != NULL );
    227     assert( io->handle != NULL );
     226    assert( io );
     227    assert( io->handle );
    228228
    229229    return io->handle;
     
    233233tr_peerIoGetAddress( const tr_peerIo * io, uint16_t * port )
    234234{
    235     assert( io != NULL );
    236 
    237     if( port != NULL )
     235    assert( io );
     236
     237    if( port )
    238238       *port = io->port;
    239239
     
    330330                         const uint8_t * hash )
    331331{
    332     assert( io != NULL );
     332    assert( io );
    333333
    334334    tr_cryptoSetTorrentHash( io->crypto, hash );
     
    338338tr_peerIoGetTorrentHash( tr_peerIo * io )
    339339{
    340     assert( io != NULL );
    341     assert( io->crypto != NULL );
     340    assert( io );
     341    assert( io->crypto );
    342342
    343343    return tr_cryptoGetTorrentHash( io->crypto );
     
    347347tr_peerIoHasTorrentHash( const tr_peerIo * io )
    348348{
    349     assert( io != NULL );
    350     assert( io->crypto != NULL );
     349    assert( io );
     350    assert( io->crypto );
    351351
    352352    return tr_cryptoHasTorrentHash( io->crypto );
     
    361361                     const uint8_t * peer_id )
    362362{
    363     assert( io != NULL );
     363    assert( io );
    364364
    365365    if(( io->peerIdIsSet = peer_id != NULL ))
     
    372372tr_peerIoGetPeersId( const tr_peerIo * io )
    373373{
    374     assert( io != NULL );
     374    assert( io );
    375375    assert( io->peerIdIsSet );
    376376
     
    385385tr_peerIoEnableLTEP( tr_peerIo * io, int flag )
    386386{
    387     assert( io != NULL );
     387    assert( io );
    388388    assert( flag==0 || flag==1 );
    389389   
     
    394394tr_peerIoEnableFEXT( tr_peerIo * io, int flag )
    395395{
    396     assert( io != NULL );
     396    assert( io );
    397397    assert( flag==0 || flag==1 );
    398398   
     
    403403tr_peerIoSupportsLTEP( const tr_peerIo * io )
    404404{
    405     assert( io != NULL );
     405    assert( io );
    406406   
    407407    return io->extendedProtocolSupported;
     
    411411tr_peerIoSupportsFEXT( const tr_peerIo * io )
    412412{
    413     assert( io != NULL );
     413    assert( io );
    414414   
    415415    return io->fastPeersSupported;
     
    457457                        int         encryptionMode )
    458458{
    459     assert( io != NULL );
     459    assert( io );
    460460    assert( encryptionMode==PEER_ENCRYPTION_NONE || encryptionMode==PEER_ENCRYPTION_RC4 );
    461461
Note: See TracChangeset for help on using the changeset viewer.