Messages in this thread Patch in this message | | | From | Haowen Bai <> | Subject | [PATCH] tools/power/x86_energy_perf_policy: Fix warning comparing pointer to 0 | Date | Thu, 24 Mar 2022 09:33:30 +0800 |
| |
Avoid pointer type value compared with 0 to make code clear.
Signed-off-by: Haowen Bai <baihaowen@meizu.com> --- tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c b/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c index 5fd9e59..fd2b982 100644 --- a/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c +++ b/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c @@ -1517,7 +1517,7 @@ int main(int argc, char **argv) parse_cpuid(); /* If CPU-set and PKG-set are not initialized, default to all CPUs */ - if ((cpu_selected_set == 0) && (pkg_selected_set == 0)) + if ((cpu_selected_set == NULL) && (pkg_selected_set == 0)) cpu_selected_set = cpu_present_set; /* -- 2.7.4
| |