diff options
author | Aaron Marcher <me@drkhsh.at> | 2018-07-06 23:26:12 +0200 |
---|---|---|
committer | Aaron Marcher <me@drkhsh.at> | 2018-07-06 23:26:12 +0200 |
commit | f48d759c6a9d67795a3220dbce14be47298d9390 (patch) | |
tree | c711b6d67316c85571f5a794113fa8e2b9082cfe | |
parent | bef282ed83c52cecca2f2d5877cef710159abaa1 (diff) |
entropy: Use POSIX types for format specifiers
-rw-r--r-- | components/entropy.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/entropy.c b/components/entropy.c index 4ca7110..7f6112e 100644 --- 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 * |