Changeset 12020


Ignore:
Timestamp:
Feb 24, 2011, 4:14:12 AM (11 years ago)
Author:
jordan
Message:

(trunk libT) make the tr_bitsetToBenc() and tr_bitsetFromBenc() functions follow bitset.c's variable naming convention of how the "this" pointer is named

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/bitset.c

    r12019 r12020  
    205205
    206206tr_bool
    207 tr_bitsetFromBenc( tr_bitset * bitset, tr_benc * benc )
     207tr_bitsetFromBenc( tr_bitset * b, tr_benc * benc )
    208208{
    209209    size_t buflen;
     
    215215        if( ( buflen == 3 ) && !memcmp( buf, "all", 3 ) )
    216216        {
    217             tr_bitsetSetHaveAll( bitset );
     217            tr_bitsetSetHaveAll( b );
    218218            handled = TRUE;
    219219        }
    220220        else if( ( buflen == 4 ) && !memcmp( buf, "none", 4 ) )
    221221        {
    222             tr_bitsetSetHaveNone( bitset );
     222            tr_bitsetSetHaveNone( b );
    223223            handled = TRUE;
    224224        }
    225225        else
    226226        {
    227             bitset->haveAll = FALSE;
    228             bitset->haveNone = FALSE;
    229             tr_free( bitset->bitfield.bits );
    230             bitset->bitfield.bits = tr_memdup( buf, buflen );
    231             bitset->bitfield.byteCount = buflen;
    232             bitset->bitfield.bitCount = buflen * 8;
     227            b->haveAll = FALSE;
     228            b->haveNone = FALSE;
     229            tr_free( b->bitfield.bits );
     230            b->bitfield.bits = tr_memdup( buf, buflen );
     231            b->bitfield.byteCount = buflen;
     232            b->bitfield.bitCount = buflen * 8;
    233233            handled = TRUE;
    234234        }
     
    239239
    240240void
    241 tr_bitsetToBenc( const tr_bitset * bitset, tr_benc * benc )
    242 {
    243     if( bitset->haveAll )
     241tr_bitsetToBenc( const tr_bitset * b, tr_benc * benc )
     242{
     243    if( b->haveAll )
    244244    {
    245245        tr_bencInitStr( benc, "all", 3 );
    246246    }
    247     else if( bitset->haveNone )
     247    else if( b->haveNone )
    248248    {
    249249        tr_bencInitStr( benc, "none", 4 );
     
    251251    else
    252252    {
    253         const tr_bitfield * bf = &bitset->bitfield;
     253        const tr_bitfield * bf = &b->bitfield;
    254254        const size_t n = tr_bitfieldCountTrueBits( bf );
    255255
Note: See TracChangeset for help on using the changeset viewer.