fix comparison prototype to match qsort() expectation

This commit is contained in:
Hartmut Holzgraefe
2015-02-13 17:30:02 +01:00
parent 2166883383
commit 21613cb03d

View File

@ -488,8 +488,11 @@ char *ptr;
}
static int
cmp_topn(TOPNQ **a, TOPNQ **b)
cmp_topn(const void *va, const void *vb)
{
TOPNQ **a = (TOPNQ **)va;
TOPNQ **b = (TOPNQ **)vb;
if ((*b)->duration.tv_sec == (*a)->duration.tv_sec)
return (*b)->duration.tv_usec - (*a)->duration.tv_usec;
return (*b)->duration.tv_sec - (*a)->duration.tv_sec;