1
0
Fork 0
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:
Jordan Lee 2011-03-16 00:49:43 +00:00
parent 757dac11ef
commit 330e922cc7

View file

@ -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