mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-27 10:34:16 +01:00
Use ternary operator with the most common case first
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
b72b7e6b9d
commit
11779077a0
@ -2488,10 +2488,7 @@ int mbedtls_mpi_random( mbedtls_mpi *X,
|
||||
* is small, use a higher repeat count, otherwise the probability of
|
||||
* failure is macroscopic.
|
||||
*/
|
||||
if( n_bytes <= 4 )
|
||||
count = 250;
|
||||
else
|
||||
count = 30;
|
||||
count = ( n_bytes > 4 ? 30 : 250 );
|
||||
|
||||
/* Ensure that target MPI has exactly the same number of limbs
|
||||
* as the upper bound, even if the upper bound has leading zeros.
|
||||
|
Loading…
Reference in New Issue
Block a user