Ignore:
Timestamp:
Jul 24, 2007, 8:49:47 PM (14 years ago)
Author:
charles
Message:

add some assertion tests for #transmission

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/completion.c

    r2481 r2485  
    127127    const int endBlock   = startBlock + n_blocks;
    128128
     129    assert( cp != NULL );
     130    assert( 0 <= piece );
     131    assert( piece < tor->info.pieceCount );
     132    assert( 0 <= startBlock );
     133    assert( startBlock < tor->blockCount );
     134    assert( startBlock <= endBlock );
     135    assert( endBlock < tor->blockCount );
     136
    129137    cp->completeBlocks[piece] = 0;
    130138    tr_bitfieldRemRange ( cp->blockBitfield, startBlock, endBlock );
Note: See TracChangeset for help on using the changeset viewer.