Ignore:
Timestamp:
Mar 30, 2011, 4:14:57 AM (11 years ago)
Author:
jordan
Message:

(trunk libT) handle situations where we don't know the bitfield's upper bound in advance. This comes up sometimes with magnet links.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/completion.c

    r12251 r12262  
    3737}
    3838
    39 bool
     39void
    4040tr_cpBlockInit( tr_completion * cp, const tr_bitfield * b )
    4141{
    42     bool success;
    43 
    4442    tr_cpReset( cp );
    4543
    4644    /* set blockBitfield */
    47     success = tr_bitfieldSetFromBitfield( &cp->blockBitfield, b );
     45    tr_bitfieldSetFromBitfield( &cp->blockBitfield, b );
    4846
    4947    /* set sizeNow */
     
    5250    if( tr_bitfieldHas( b, cp->tor->blockCount-1 ) )
    5351        cp->sizeNow -= ( cp->tor->blockSize - cp->tor->lastBlockSize );
    54 
    55     return success;
    5652}
    5753
Note: See TracChangeset for help on using the changeset viewer.