Skip to content

Commit 38f7290

Browse files
committed
Improve code gen
1 parent a34de2a commit 38f7290

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ext/random/zend_utils.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@ ZEND_ATTRIBUTE_NONNULL PHPAPI zend_result php_random_bytes_insecure_for_zend(
2626
{
2727
php_random_bytes_insecure_state_for_zend *state = (php_random_bytes_insecure_state_for_zend*) opaque_state;
2828

29-
if (!state->initialized) {
29+
if (UNEXPECTED(!state->initialized)) {
3030
uint64_t t[4];
31-
php_random_fallback_seed_state fallback_state = {
32-
.initialized = false,
33-
};
31+
php_random_fallback_seed_state fallback_state;
32+
fallback_state.initialized = false;
3433

3534
do {
3635
/* Skip the CSPRNG if it has already failed */

0 commit comments

Comments
 (0)