[hackers] [slstatus] Refactor entropy.c || Laslo Hunhold

From: <git_AT_suckless.org>
Date: Sun, 20 May 2018 00:20:03 +0200 (CEST)

commit 951ea4e304cf23f8464a4b6896cfcf4035920249
Author: Laslo Hunhold <dev_AT_frign.de>
AuthorDate: Sun May 20 00:18:08 2018 +0200
Commit: Aaron Marcher <me_AT_drkhsh.at>
CommitDate: Sun May 20 00:19:52 2018 +0200

    Refactor entropy.c

diff --git a/components/entropy.c b/components/entropy.c
index ac61679..606bfec 100644
--- a/components/entropy.c
+++ b/components/entropy.c
_AT_@ -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 *
Received on Sun May 20 2018 - 00:20:03 CEST

This archive was generated by hypermail 2.3.0 : Sun May 20 2018 - 00:24:37 CEST