From acfa1f50c24add6b9a78d94af21f9350150fb9c2 Mon Sep 17 00:00:00 2001 From: Aaron Marcher Date: Sat, 7 Jul 2018 11:08:26 +0200 Subject: Simplify format specifiers for uintmax_t --- components/cpu.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'components/cpu.c') diff --git a/components/cpu.c b/components/cpu.c index 14c8658..43ee8a9 100644 --- a/components/cpu.c +++ b/components/cpu.c @@ -1,13 +1,11 @@ /* See LICENSE file for copyright and license details. */ +#include #include #include #include "../util.h" #if defined(__linux__) - #include - #include - const char * cpu_freq(void) { @@ -15,7 +13,7 @@ /* in kHz */ if (pscanf("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", - "%" PRIuMAX, &freq) != 1) { + "%ju", &freq) != 1) { return NULL; } @@ -45,7 +43,6 @@ (a[0] + a[1] + a[2] + a[3] + a[4] + a[5] + a[6])))); } #elif defined(__OpenBSD__) - #include #include #include #include -- cgit v1.2.3