}
static int
-flushContiguous( tr_cache * cache, int pos, int n, int rank )
+flushContiguous( tr_cache * cache, int pos, int n )
{
int i;
int err = 0;
for( i = 0; !err && i < n; ++i )
{
- err = flushContiguous( cache, runs[i].pos, runs[i].len, runs[i].rank );
+ err = flushContiguous( cache, runs[i].pos, runs[i].len );
for( j = i + 1; j < n; ++j )
if( runs[j].pos > runs[i].pos )
runs[j].pos -= runs[i].len;
const struct cache_block * b = tr_ptrArrayNth( &cache->blocks, pos );
if( b->tor != torrent ) break;
if( ( b->block < begin ) || ( b->block >= end ) ) break;
- err = flushContiguous( cache, pos, getBlockRun( cache, pos, NULL ), 0 );
+ err = flushContiguous( cache, pos, getBlockRun( cache, pos, NULL ) );
}
return err;
{
const struct cache_block * b = tr_ptrArrayNth( &cache->blocks, pos );
if( b->tor != torrent ) break;
- err = flushContiguous( cache, pos, getBlockRun( cache, pos, NULL ), 0 );
+ err = flushContiguous( cache, pos, getBlockRun( cache, pos, NULL ) );
}
return err;