Ignore:
Timestamp:
Sep 10, 2009, 3:29:17 AM (13 years ago)
Author:
charles
Message:

(1.7x libT) fix a couple of compiler warnings from the last commit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.7x/libtransmission/peer-mgr.c

    r9088 r9090  
    124124};
    125125
     126static tr_bool
     127tr_isAtom( const struct peer_atom * atom )
     128{
     129    return ( atom != NULL )
     130        && ( atom->from < TR_PEER_FROM__MAX )
     131        && ( tr_isAddress( &atom->addr ) );
     132}
     133
    126134struct tr_blockIterator
    127135{
     
    245253    const struct peer_atom * b = vb;
    246254
    247     assert( tr_isAddress( &b->addr ) );
    248     assert( ( 0 <= b->from ) && ( b->from < TR_PEER_FROM__MAX ) );
     255    assert( tr_isAtom( b ) );
    249256
    250257    return comparePeerAtomToAddress( va, &b->addr );
     
    11961203{
    11971204    assert( tr_isAddress( addr ) );
    1198     assert( ( 0 <= from ) && ( from < TR_PEER_FROM__MAX ) );
     1205    assert( from < TR_PEER_FROM__MAX );
    11991206
    12001207    if( getExistingAtom( t, addr ) == NULL )
     
    15341541    const struct peer_atom * b = * (const struct peer_atom**) vb;
    15351542
    1536     assert( ( 0 <= a->from ) && ( a->from < TR_PEER_FROM__MAX ) );
    1537     assert( ( 0 <= b->from ) && ( b->from < TR_PEER_FROM__MAX ) );
     1543    assert( tr_isAtom( a ) );
     1544    assert( tr_isAtom( b ) );
    15381545
    15391546    if( a->piece_data_time != b->piece_data_time )
Note: See TracChangeset for help on using the changeset viewer.