lkml.org 
[lkml]   [2019]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] random: Make /dev/random wait for crng_ready
Date
On 2/15/19 2:47 AM, Bernd Edlinger wrote:
> while (1) {
> - n = extract_entropy_user(&blocking_pool, buf, nbytes);
> + n = crng_ready()
> + ? extract_entropy_user(&blocking_pool, buf, nbytes)
> + : 0;

Aehm, the whitespace after ? does not align with :, didn't see that before.

I wonder if it would be better style to use
if (crng_ready())
n = extract...;
else
n = 0;


Bernd.

\
 
 \ /
  Last update: 2019-02-15 06:41    [W:1.789 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site