diff options
author | Aaron Marcher <me@drkhsh.at> | 2018-07-07 10:54:12 +0200 |
---|---|---|
committer | Aaron Marcher <me@drkhsh.at> | 2018-07-07 10:54:12 +0200 |
commit | e20b50112e01f92f7c302107b59b17d8cc28387a (patch) | |
tree | 5d26239d53725998198f418ed449afc031510357 | |
parent | 43a12832a343747b7317987b552a87eb8ed5b42d (diff) |
cpu_freq: Change to 64 bit integers
Remove unnecessary cast to size_t
-rw-r--r-- | components/cpu.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/cpu.c b/components/cpu.c index ceb95d8..2c5e4dc 100644 --- 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 * |