projects
/
suckless
/
slstatus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43a1283
)
cpu_freq: Change to 64 bit integers
author
Aaron Marcher
<me@drkhsh.at>
Sat, 7 Jul 2018 08:54:12 +0000
(10:54 +0200)
committer
Aaron Marcher
<me@drkhsh.at>
Sat, 7 Jul 2018 08:54:12 +0000
(10:54 +0200)
Remove unnecessary cast to size_t
components/cpu.c
patch
|
blob
|
history
diff --git
a/components/cpu.c
b/components/cpu.c
index ceb95d868675b8eeac58de49aff6aad5b4c6e3b0..2c5e4dc94b5317258592b224ce45846e33a99891 100644
(file)
--- a/
components/cpu.c
+++ b/
components/cpu.c
@@
-53,7
+53,8
@@
const char *
cpu_freq(void)
{
- int freq, mib[2];
+ int mib[2];
+ uintmax_t freq;
size_t size;
mib[0] = CTL_HW;
@@
-67,7
+68,7
@@
return NULL;
}
- return fmt_human(
(size_t)
freq * 1000 * 1000, 1000);
+ return fmt_human(freq * 1000 * 1000, 1000);
}
const char *