Use MBEDTLS_MPI_CHK where warranted

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2021-06-03 11:38:26 +02:00
parent ed32b576a4
commit 405b091d9e

View file

@ -2516,11 +2516,7 @@ int mbedtls_mpi_random( mbedtls_mpi *X,
goto cleanup;
}
ret = mbedtls_mpi_lt_mpi_ct( X, N, &cmp );
if( ret != 0 )
{
goto cleanup;
}
MBEDTLS_MPI_CHK( mbedtls_mpi_lt_mpi_ct( X, N, &cmp ) );
}
while( mbedtls_mpi_cmp_int( X, min ) < 0 || cmp != 1 );