diff options
author | Aaron Marcher <me@drkhsh.at> | 2018-07-07 11:08:26 +0200 |
---|---|---|
committer | Aaron Marcher <me@drkhsh.at> | 2018-07-07 11:08:26 +0200 |
commit | 2b0df5f3d490f58341e2e828f412298adfabae92 (patch) | |
tree | 2153a871d07704dcae0eec15b1d8ceab04724fbd /components/cpu.c | |
parent | 5316c498c721e25dace81a6df30121abe9eefc7b (diff) |
Simplify format specifiers for uintmax_t
Diffstat (limited to 'components/cpu.c')
-rw-r--r-- | components/cpu.c | 7 |
1 files changed, 2 insertions, 5 deletions
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 <stdint.h> #include <stdio.h> #include <string.h> #include "../util.h" #if defined(__linux__) - #include <inttypes.h> - #include <stdint.h> - 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 <inttypes.h> #include <sys/param.h> #include <sys/sched.h> #include <sys/sysctl.h> |