mirror of
https://github.com/transmission/transmission
synced 2025-03-04 18:48:06 +00:00
(trunk libT) minor tweak to the cache sorting code
This commit is contained in:
parent
757dac11ef
commit
330e922cc7
1 changed files with 4 additions and 3 deletions
|
@ -104,12 +104,13 @@ getBlockRun( const tr_cache * cache, int pos, struct run_info * info )
|
||||||
return i-pos;
|
return i-pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* higher rank comes before lower rank */
|
||||||
static int
|
static int
|
||||||
compareRuns( const void * va, const void * vb )
|
compareRuns( const void * va, const void * vb )
|
||||||
{
|
{
|
||||||
const struct run_info a = *(const struct run_info*)va;
|
const struct run_info * a = va;
|
||||||
const struct run_info b = *(const struct run_info*)vb;
|
const struct run_info * b = vb;
|
||||||
return b.rank - a.rank;
|
return b->rank - a->rank;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
|
Loading…
Add table
Reference in a new issue