Ignore:
Timestamp:
Jan 4, 2009, 6:01:15 PM (13 years ago)
Author:
charles
Message:

(trunk libT) minor speedup tweaks in peer-request hotspots

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/utils.c

    r7609 r7616  
    13021302{
    13031303    size_t first = 0;
    1304 
    1305     while( nmemb > 0 )
     1304    const char * cbase = base;
     1305
     1306    while( nmemb )
    13061307    {
    13071308        const size_t half = nmemb / 2;
    13081309        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 );
    13101311
    13111312        if( c < 0 )
Note: See TracChangeset for help on using the changeset viewer.