Written by Fred Fish <fnf@cygnus.com>
Rewritten by Jim Blandy <jimb@cygnus.com>
- Copyright (C) 1999, 2000, 2002, 2003, 2007, 2008
+ Copyright (C) 1999, 2000, 2002, 2003, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GDB.
\f
/* 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)
{
/* 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)
{