From d1e33988227bf88c6bc33d4f83274dda78ee2310 Mon Sep 17 00:00:00 2001 From: Aaron Marcher Date: Fri, 6 Jul 2018 23:41:02 +0200 Subject: temperature: Improve types --- components/temperature.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'components') diff --git a/components/temperature.c b/components/temperature.c index fe2e0c9..2c57853 100644 --- a/components/temperature.c +++ b/components/temperature.c @@ -4,16 +4,18 @@ #include "../util.h" #if defined(__linux__) + #include + const char * temp(const char *file) { - int 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 -- cgit v1.2.3