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:
ab4f24a
)
temperature: Improve types
author
Aaron Marcher
<me@drkhsh.at>
Fri, 6 Jul 2018 21:41:02 +0000
(23:41 +0200)
committer
Aaron Marcher
<me@drkhsh.at>
Fri, 6 Jul 2018 21:41:02 +0000
(23:41 +0200)
components/temperature.c
patch
|
blob
|
history
diff --git
a/components/temperature.c
b/components/temperature.c
index fe2e0c9903b1303da9b6e69023ac0848b816053a..2c57853d0b35afa3b98853575351f53e8c6a060b 100644
(file)
--- a/
components/temperature.c
+++ b/
components/temperature.c
@@
-4,16
+4,18
@@
#include "../util.h"
#if defined(__linux__)
+ #include <inttypes.h>
+
const char *
temp(const char *file)
{
-
in
t temp;
+
uint64_
t temp;
- if(pscanf(file, "%
d"
, &temp) != 1) {
+ if(pscanf(file, "%
" PRIu64
, &temp) != 1) {
return NULL;
}
- return bprintf("%
d"
, temp / 1000);
+ return bprintf("%
" PRIu64
, temp / 1000);
}
#elif defined(__OpenBSD__)
#include <stdio.h>