From d391b8ce612d5472e3cb7a86ff8f69e642a43ba2 Mon Sep 17 00:00:00 2001 From: Werner Lewis Date: Tue, 8 Nov 2022 15:53:47 +0000 Subject: [PATCH] Change types and move const before type Signed-off-by: Werner Lewis --- library/bignum_mod_raw.c | 6 +++--- library/bignum_mod_raw.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/library/bignum_mod_raw.c b/library/bignum_mod_raw.c index 01f5a4423..94dcf7724 100644 --- a/library/bignum_mod_raw.c +++ b/library/bignum_mod_raw.c @@ -120,11 +120,11 @@ int mbedtls_mpi_mod_raw_write( const mbedtls_mpi_uint *A, /* BEGIN MERGE SLOT 5 */ void mbedtls_mpi_mod_raw_add( mbedtls_mpi_uint *X, - mbedtls_mpi_uint const *A, - mbedtls_mpi_uint const *B, + const mbedtls_mpi_uint *A, + const mbedtls_mpi_uint *B, const mbedtls_mpi_mod_modulus *N ) { - size_t carry, borrow = 0; + mbedtls_mpi_uint carry, borrow; carry = mbedtls_mpi_core_add( X, A, B, N->limbs ); borrow = mbedtls_mpi_core_sub( X, X, N->p, N->limbs ); (void) mbedtls_mpi_core_add_if( X, N->p, N->limbs, ( carry < borrow ) ); diff --git a/library/bignum_mod_raw.h b/library/bignum_mod_raw.h index d6522381b..bcb4a1596 100644 --- a/library/bignum_mod_raw.h +++ b/library/bignum_mod_raw.h @@ -170,8 +170,8 @@ int mbedtls_mpi_mod_raw_write( const mbedtls_mpi_uint *A, * \param[in] N The address of the modulus. */ void mbedtls_mpi_mod_raw_add( mbedtls_mpi_uint *X, - mbedtls_mpi_uint const *A, - mbedtls_mpi_uint const *B, + const mbedtls_mpi_uint *A, + const mbedtls_mpi_uint *B, const mbedtls_mpi_mod_modulus *N ); /* END MERGE SLOT 5 */