From e1bba7ce481bfb06e059d1aad5efee50945fb451 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 10 Mar 2021 23:44:10 +0100 Subject: [PATCH] Fix semantically meaningful typos in comments Signed-off-by: Gilles Peskine --- library/bignum.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/bignum.c b/library/bignum.c index f1e544370..798117513 100644 --- a/library/bignum.c +++ b/library/bignum.c @@ -1674,13 +1674,13 @@ int mbedtls_mpi_mul_int( mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_uint return( 0 ); } - /* Calculate X*b as A + A*(b-1) to take advantage of mpi_mul_hlp */ + /* Calculate A*b as A + A*(b-1) to take advantage of mpi_mul_hlp */ int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; /* In general, A * b requires 1 limb more than b. If * A->p[n - 1] * b / b == A->p[n - 1], then A * b fits in the same * number of limbs as A and the call to grow() is not required since - * copy() will take care of the growth. However, experimentally, - * making the call to grow() conditional causes slightly fewer + * copy() will take care of the growth if needed. However, experimentally, + * making the call to grow() unconditional causes slightly fewer * calls to calloc() in ECP code, presumably because it reuses the * same mpi for a while and this way the mpi is more likely to directly * grow to its final size. */