Skip to content

random: Simplify control flow for handling /dev/urandom errors #10392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 23, 2023

Conversation

TimWolla
Copy link
Member

Review recommended with whitespace changes ignored.


The only way the previous if (read_bytes < size) branch could be taken is when the loop was exited by the break; statement. We can just merge this into the loop to make the code more obvious.

The only way the previous `if (read_bytes < size)` branch could be taken is
when the loop was exited by the `break;` statement. We can just merge this into
the loop to make the code more obvious.
Copy link
Member

@cmb69 cmb69 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@TimWolla TimWolla merged commit a7998fd into php:master Jan 23, 2023
@TimWolla TimWolla deleted the csprng-control-flow branch January 23, 2023 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants