Introduction
Introduction Statistics Contact Development Disclaimer Help
temperature: Improve types - slstatus - status monitor
git clone git://git.suckless.org/slstatus
Log
Files
Refs
README
LICENSE
---
commit d1e33988227bf88c6bc33d4f83274dda78ee2310
parent ab4f24a612fd40bb58b5504e979ad476533dd891
Author: Aaron Marcher <[email protected]>
Date: Fri, 6 Jul 2018 23:41:02 +0200
temperature: Improve types
Diffstat:
M components/temperature.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git 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)
{
- 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>
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.