]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/randutils: remove superfluous continue
authorKarel Zak <kzak@redhat.com>
Mon, 2 Oct 2017 09:27:59 +0000 (11:27 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 2 Oct 2017 09:30:49 +0000 (11:30 +0200)
Addresses: https://github.com/karelzak/util-linux/commit/fa949792072530b49ef5760d7ecd6d250c66e35f#commitcomment-24678670
Signed-off-by: Karel Zak <kzak@redhat.com>
lib/randutils.c

index b7e8e47e01b736a37eae5fdd5672a584c7ed49e2..e1c4059e19064463a98acdef1f5b91bb1111bd6e 100644 (file)
@@ -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)