Refactor entropy.c
This commit is contained in:
parent
3f45a5f7ca
commit
951ea4e304
|
@ -9,9 +9,12 @@
|
||||||
{
|
{
|
||||||
int num;
|
int num;
|
||||||
|
|
||||||
return (pscanf("/proc/sys/kernel/random/entropy_avail",
|
if (pscanf("/proc/sys/kernel/random/entropy_avail",
|
||||||
"%d", &num) == 1) ?
|
"%d", &num) != 1) {
|
||||||
bprintf("%d", num) : NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return bprintf("%d", num);
|
||||||
}
|
}
|
||||||
#elif defined(__OpenBSD__)
|
#elif defined(__OpenBSD__)
|
||||||
const char *
|
const char *
|
||||||
|
|
Loading…
Reference in New Issue