From: Kang Minchul Date: Sat, 5 Nov 2022 13:59:32 +0000 (+0900) Subject: perf print-events: Remove redundant comparison with zero X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=cf9f67b36303de65596ae7504a2a7573c08876bb;p=linux.git perf print-events: Remove redundant comparison with zero Since variable npmus is unsigned int, comparing with 0 is unnecessary. Signed-off-by: Kang Minchul Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221105135932.81612-1-tegongkang@gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/print-events.c b/tools/perf/util/print-events.c index c4d5d87fae2f6..6df947df1c0fc 100644 --- a/tools/perf/util/print-events.c +++ b/tools/perf/util/print-events.c @@ -311,10 +311,8 @@ restart: if ((hybrid_supported == 0) || (hybrid_supported == npmus)) { evt_list[evt_i] = strdup(name); - if (npmus > 0) { - for (j = 0; j < npmus; j++) - zfree(&evt_pmus[j]); - } + for (j = 0; j < npmus; j++) + zfree(&evt_pmus[j]); } else { for (j = 0; j < hybrid_supported; j++) { evt_list[evt_i++] = evt_pmus[j];