Introduction
Introduction Statistics Contact Development Disclaimer Help
entropy: Use POSIX types for format specifiers - slstatus - status monitor
git clone git://git.suckless.org/slstatus
Log
Files
Refs
README
LICENSE
---
commit b65c058598afe7319c1a634cd8423ec25d0d7215
parent c59b64e643386f42f4329d77d25070be264245da
Author: Aaron Marcher <[email protected]>
Date: Fri, 6 Jul 2018 23:26:12 +0200
entropy: Use POSIX types for format specifiers
Diffstat:
M components/entropy.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/components/entropy.c b/components/entropy.c
@@ -1,7 +1,7 @@
/* See LICENSE file for copyright and license details. */
#if defined(__linux__)
+ #include <inttypes.h>
#include <stdio.h>
- #include <stdint.h>
#include "../util.h"
@@ -11,11 +11,11 @@
uint64_t num;
if (pscanf("/proc/sys/kernel/random/entropy_avail",
- "%d", &num) != 1) {
+ "%" PRIu64, &num) != 1) {
return NULL;
}
- return bprintf("%d", num);
+ return bprintf("%" PRIu64, num);
}
#elif defined(__OpenBSD__)
const char *
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.