From 68e0dc1a6f22f19e13c7cb9dca7192e7fbc6568b Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 17 Jan 2020 20:40:41 -0800 Subject: [PATCH] stat: Remove two superfluous casts 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 --- stat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stat.c b/stat.c index 55d83fcc..4d5b2436 100644 --- 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; -- 2.25.1