Changeset 12904
- Timestamp:
- Sep 21, 2011, 8:17:36 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/bitfield.c
r12902 r12904 186 186 const bool has_all = tr_bitfieldHasAll( b ); 187 187 188 assert( tr_bitfieldIsValid( b ) );189 190 188 if( has_all ) 191 189 bytes_needed = get_bytes_needed( MAX( nth, b->true_count ) + 1 ); … … 195 193 if( b->alloc_count < bytes_needed ) 196 194 { 197 #ifndef NDEBUG198 const size_t old_count = countArray( b );199 #endif200 195 b->bits = tr_renew( uint8_t, b->bits, bytes_needed ); 201 196 memset( b->bits + b->alloc_count, 0, bytes_needed - b->alloc_count ); 202 197 b->alloc_count = bytes_needed; 203 assert( old_count == countArray( b ) );204 198 205 199 if( has_all )
Note: See TracChangeset
for help on using the changeset viewer.