]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Missing piece of rev.14275
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 31 Aug 2015 13:58:48 +0000 (06:58 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 31 Aug 2015 13:58:48 +0000 (06:58 -0700)
src/ProfStats.cc

index 1608034e80a4835f28729dcc814861683b77a645..9cafc969cbc8e45a377301d29edd5401e68b7739 100644 (file)
@@ -62,12 +62,15 @@ xprof_move(xprof_stats_data * head, xprof_stats_data * hist)
 }
 
 static int
-xprof_comp(xprof_stats_node ** ii, xprof_stats_node ** jj)
+xprof_comp(const void *A, const void *B)
 {
-    if ((*ii)->hist.summ < (*jj)->hist.summ)
+    const xprof_stats_node *ii = *(static_cast<const xprof_stats_node * const *>(A));
+    const xprof_stats_node *jj = *(static_cast<const xprof_stats_node * const *>(B));
+
+    if (ii->hist.summ < jj->hist.summ)
         return (1);
 
-    if ((*ii)->hist.summ > (*jj)->hist.summ)
+    if (ii->hist.summ > jj->hist.summ)
         return (-1);
 
     return (0);
@@ -80,7 +83,7 @@ xprof_sorthist(TimersArray * xprof_list)
         sortlist[i] = xprof_list[i];
     }
 
-    qsort(&sortlist[XPROF_PROF_UNACCOUNTED+1], XPROF_LAST - XPROF_PROF_UNACCOUNTED+1, sizeof(xprof_stats_node *), (QS *) xprof_comp);
+    qsort(&sortlist[XPROF_PROF_UNACCOUNTED+1], XPROF_LAST - XPROF_PROF_UNACCOUNTED+1, sizeof(xprof_stats_node *), xprof_comp);
 }
 
 static double time_frame;