Introduction
Introduction Statistics Contact Development Disclaimer Help
temp: OpenBSD: use long long format string type - spoon - set dwm status
git clone git://git.codemadness.org/spoon
Log
Files
Refs
LICENSE
---
commit dd94bee628add1dad6d41fc2223a40b87311d871
parent 0cd95a66fd4f86341168740f3402bc07690cbe3f
Author: Hiltjo Posthuma <[email protected]>
Date: Sun, 1 Jul 2018 11:40:59 +0200
temp: OpenBSD: use long long format string type
Diffstat:
M temp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/temp.c b/temp.c
@@ -22,7 +22,7 @@ tempread(void *arg, char *buf, size_t len)
if (sysctl(mib, 5, &temp, &sz, NULL, 0) == -1)
return -1;
/* temp.value is in kelvin so convert to celsius for display */
- snprintf(buf, len, "%d", (temp.value - 273150000) / 1000000);
+ snprintf(buf, len, "%lld", (temp.value - 273150000) / 1000000);
return 0;
}
#elif __linux__
You are viewing proxied material from codemadness.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.