projects
/
suckless
/
slstatus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c59b64e
)
entropy: Use POSIX types for format specifiers
author
Aaron Marcher
<me@drkhsh.at>
Fri, 6 Jul 2018 21:26:12 +0000
(23:26 +0200)
committer
Aaron Marcher
<me@drkhsh.at>
Fri, 6 Jul 2018 21:26:12 +0000
(23:26 +0200)
components/entropy.c
patch
|
blob
|
history
diff --git
a/components/entropy.c
b/components/entropy.c
index 4ca71107e117e8ff9ef26a16066ed87840e5d567..7f6112e899a2497483cfb974a867b5c3fa0b3348 100644
(file)
--- 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 *