Changeset 7616
- Timestamp:
- Jan 4, 2009, 6:01:15 PM (13 years ago)
- Location:
- trunk/libtransmission
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/peer-io.h
r7594 r7616 359 359 static inline struct evbuffer * tr_peerIoGetReadBuffer( tr_peerIo * io ) 360 360 { 361 assert( tr_isPeerIo( io ) );362 363 361 return io->inbuf; 364 362 } -
trunk/libtransmission/request-list.c
r7615 r7616 26 26 return a->offset < b->offset ? -1 : 1; 27 27 28 if( a->length != b->length )29 return a->length < b->length ? -1 : 1;30 31 28 return 0; 32 29 } 33 30 34 31 const struct request_list REQUEST_LIST_INIT = { 0, 0, NULL, NULL }; 32 33 static const int GROW = 8; 35 34 36 35 static void … … 39 38 if( list->max < max ) 40 39 { 41 list->max = max ;40 list->max = max + GROW; 42 41 list->fifo = tr_renew( struct peer_request, list->fifo, list->max ); 43 42 list->sort = tr_renew( struct peer_request, list->sort, list->max ); -
trunk/libtransmission/utils.c
r7609 r7616 1302 1302 { 1303 1303 size_t first = 0; 1304 1305 while( nmemb > 0 ) 1304 const char * cbase = base; 1305 1306 while( nmemb ) 1306 1307 { 1307 1308 const size_t half = nmemb / 2; 1308 1309 const size_t middle = first + half; 1309 const int c = compar( key, ((const char*)base)+ size*middle );1310 const int c = compar( key, cbase + size*middle ); 1310 1311 1311 1312 if( c < 0 )
Note: See TracChangeset
for help on using the changeset viewer.