From 43dc89344940da43ae53c768b9e85635b77e0b50 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 2 Oct 2017 11:27:59 +0200 Subject: [PATCH] lib/randutils: remove superfluous continue Addresses: https://github.com/karelzak/util-linux/commit/fa949792072530b49ef5760d7ecd6d250c66e35f#commitcomment-24678670 Signed-off-by: Karel Zak --- lib/randutils.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/randutils.c b/lib/randutils.c index b7e8e47e01..e1c4059e19 100644 --- a/lib/randutils.c +++ b/lib/randutils.c @@ -109,13 +109,10 @@ void random_get_bytes(void *buf, size_t nbytes) n -= x; cp += x; lose_counter = 0; - } else if (errno == ENOSYS) { /* kernel without getrandom() */ + } else if (errno == ENOSYS) /* kernel without getrandom() */ + break; + else if (lose_counter++ > 16) /* entropy problem? */ break; - } else { - if (lose_counter++ > 16) /* entropy problem? */ - break; - continue; - } } if (errno == ENOSYS) -- 2.47.2