diff options
Diffstat (limited to 'gdb/bcache.c')
-rw-r--r-- | gdb/bcache.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/gdb/bcache.c b/gdb/bcache.c index 1bc2eba..4badf6e 100644 --- a/gdb/bcache.c +++ b/gdb/bcache.c @@ -301,15 +301,6 @@ bcache_xfree (struct bcache *bcache) /* Printing statistics. */ -static int -compare_ints (const void *ap, const void *bp) -{ - /* Because we know we're comparing two ints which are positive, - there's no danger of overflow here. */ - return * (int *) ap - * (int *) bp; -} - - static void print_percentage (int portion, int total) { @@ -367,9 +358,9 @@ print_bcache_statistics (struct bcache *c, char *type) /* To compute the median, we need the set of chain lengths sorted. */ qsort (chain_length, c->num_buckets, sizeof (chain_length[0]), - compare_ints); + compare_positive_ints); qsort (entry_size, c->unique_count, sizeof (entry_size[0]), - compare_ints); + compare_positive_ints); if (c->num_buckets > 0) { |