* hist.c (hist_print): Rewrite log_scale calculation loop.
+2002-02-19 Frank Ch. Eigler <fche@redhat.com>
+
+ * hist.c (hist_print): Rewrite log_scale calculation loop.
+
2002-02-11 Alan Modra <amodra@bigpond.net.au>
* Makefile.am: "make dep-am".
{
Sym **time_sorted_syms, *top_dog, *sym;
unsigned int index;
- int log_scale;
+ unsigned log_scale;
double top_time, time;
bfd_vma addr;
{
top_time /= hz;
- while (SItab[log_scale].scale * top_time < 1000.0
- && ((size_t) log_scale
- < sizeof (SItab) / sizeof (SItab[0]) - 1))
+ for (log_scale = 0; log_scale < ARRAY_SIZE (SItab); log_scale ++)
{
- ++log_scale;
+ double scaled_value = SItab[log_scale].scale * top_time;
+
+ if (scaled_value >= 1.0 && scaled_value < 1000.0)
+ break;
}
}
}