summaryrefslogtreecommitdiff
path: root/components/cpu.c
diff options
context:
space:
mode:
authorAaron Marcher <me@drkhsh.at>2018-07-07 10:50:25 +0200
committerAaron Marcher <me@drkhsh.at>2018-07-07 10:50:25 +0200
commit43a12832a343747b7317987b552a87eb8ed5b42d (patch)
tree28df6fc8f8aacd557b2c97a00a8cac321949c745 /components/cpu.c
parentd76b1a21fc014395cf9f7bd4e14180a3a0945e9c (diff)
Change uint64_t to uintmax_t
Diffstat (limited to 'components/cpu.c')
-rw-r--r--components/cpu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/cpu.c b/components/cpu.c
index e320ff6..ceb95d8 100644
--- a/components/cpu.c
+++ b/components/cpu.c
@@ -11,11 +11,11 @@
const char *
cpu_freq(void)
{
- uint64_t freq;
+ uintmax_t freq;
/* in kHz */
if (pscanf("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq",
- "%"SCNu64, &freq) != 1) {
+ "%" PRIuMAX, &freq) != 1) {
return NULL;
}
@@ -74,8 +74,8 @@
cpu_perc(void)
{
int mib[2];
- static uint64_t a[CPUSTATES];
- uint64_t b[CPUSTATES];
+ static uintmax_t a[CPUSTATES];
+ uintmax_t b[CPUSTATES];
size_t size;
mib[0] = CTL_KERN;