temperature: Improve types
Aaron Marcher me@drkhsh.at
Fri, 06 Jul 2018 23:41:02 +0200
1 files changed,
5 insertions(+),
3 deletions(-)
jump to
M
components/temperature.c
→
components/temperature.c
@@ -4,16 +4,18 @@
#include "../util.h" #if defined(__linux__) + #include <inttypes.h> + 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 <stdio.h>