slstatus

status monitor
git clone git://git.suckless.org/slstatus
Log | Files | Refs | README | LICENSE

commit 951ea4e304cf23f8464a4b6896cfcf4035920249
parent 3f45a5f7caf37ec04bbc3aea5e7def1452d1118c
Author: Laslo Hunhold <dev@frign.de>
Date:   Sun, 20 May 2018 00:18:08 +0200

Refactor entropy.c

Diffstat:
Mcomponents/entropy.c | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/components/entropy.c b/components/entropy.c @@ -9,9 +9,12 @@ { int num; - return (pscanf("/proc/sys/kernel/random/entropy_avail", - "%d", &num) == 1) ? - bprintf("%d", num) : NULL; + if (pscanf("/proc/sys/kernel/random/entropy_avail", + "%d", &num) != 1) { + return NULL; + } + + return bprintf("%d", num); } #elif defined(__OpenBSD__) const char *