(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
1 changed files with 4 additions and 3 deletions

View File

@ -104,12 +104,13 @@ getBlockRun( const tr_cache * cache, int pos, struct run_info * info )
return i-pos;
}
/* higher rank comes before lower rank */
static int
compareRuns( const void * va, const void * vb )
{
const struct run_info a = *(const struct run_info*)va;
const struct run_info b = *(const struct run_info*)vb;
return b.rank - a.rank;
const struct run_info * a = va;
const struct run_info * b = vb;
return b->rank - a->rank;
}
enum