We can always get EINTR for read; /dev/urandom is no exception.
Rearrange the order of tests for likelihood; allow degenerate buflen==0
case to perform a no-op zero-length read. This means that the normal
success path is a straight line with a single test for success.
Reviewed-by: Daniel P. Berrangé <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
v3: Rearrage the read loop again.
---
crypto/random-platform.c | 36 +++++++++++++++---------------------
1 file changed, 15 insertions(+), 21 deletions(-)