stat: Remove two superfluous casts
authorBart Van Assche <bvanassche@acm.org>
Sat, 18 Jan 2020 04:40:41 +0000 (20:40 -0800)
committerBart Van Assche <bvanassche@acm.org>
Sat, 18 Jan 2020 05:16:35 +0000 (21:16 -0800)
The C language supports implicit casting from a non-void to void pointer.
Remove two explicit casts from a non-void to a void pointer.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
stat.c

diff --git a/stat.c b/stat.c
index 55d83fcc903e62e5e91fb49ac35caf24535cac6a..4d5b24367f959f285b0da8c2db1b7ae6b9731c3f 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -159,7 +159,7 @@ unsigned int calc_clat_percentiles(uint64_t *io_u_plat, unsigned long long nr,
         * isn't a worry. Also note that this does not work for NaN values.
         */
        if (len > 1)
-               qsort((void *)plist, len, sizeof(plist[0]), double_cmp);
+               qsort(plist, len, sizeof(plist[0]), double_cmp);
 
        ovals = malloc(len * sizeof(*ovals));
        if (!ovals)
@@ -684,7 +684,7 @@ static int calc_block_percentiles(int nr_block_infos, uint32_t *block_infos,
         * isn't a worry. Also note that this does not work for NaN values.
         */
        if (len > 1)
-               qsort((void *)plist, len, sizeof(plist[0]), double_cmp);
+               qsort(plist, len, sizeof(plist[0]), double_cmp);
 
        /* Start only after the uninit entries end */
        for (nr_uninit = 0;