mirror of
https://github.com/openssl/openssl.git
synced 2025-03-31 20:10:45 +08:00
rand uniform: fix likely usage
@mspncp noted that the condition should have been likely not unlikely. Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22593)
This commit is contained in:
parent
3fa274ca81
commit
b90662b4b0
@ -85,7 +85,7 @@ uint32_t ossl_rand_uniform_uint32(OSSL_LIB_CTX *ctx, uint32_t upper, int *err)
|
||||
if (f < f2)
|
||||
return i + 1;
|
||||
/* For not all 1 bits, there is no carry so return the result */
|
||||
if (unlikely(f != 0xffffffff))
|
||||
if (likely(f != 0xffffffff))
|
||||
return i;
|
||||
/* setup for the next word of randomness */
|
||||
f = prod & 0xffffffff;
|
||||
|
Loading…
x
Reference in New Issue
Block a user