Bignum: make const placement consistent
Signed-off-by: Janos Follath <janos.follath@arm.com>
diff --git a/library/bignum.c b/library/bignum.c
index 1a762a2..9776d29 100644
--- a/library/bignum.c
+++ b/library/bignum.c
@@ -660,7 +660,7 @@
const unsigned char *buf, size_t buflen )
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
- size_t const limbs = CHARS_TO_LIMBS( buflen );
+ const size_t limbs = CHARS_TO_LIMBS( buflen );
/* Ensure that target MPI has exactly the necessary number of limbs */
MBEDTLS_MPI_CHK( mbedtls_mpi_resize_clear( X, limbs ) );
@@ -686,7 +686,7 @@
int mbedtls_mpi_read_binary( mbedtls_mpi *X, const unsigned char *buf, size_t buflen )
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
- size_t const limbs = CHARS_TO_LIMBS( buflen );
+ const size_t limbs = CHARS_TO_LIMBS( buflen );
MPI_VALIDATE_RET( X != NULL );
MPI_VALIDATE_RET( buflen == 0 || buf != NULL );
@@ -2139,7 +2139,7 @@
void *p_rng )
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
- size_t const limbs = CHARS_TO_LIMBS( size );
+ const size_t limbs = CHARS_TO_LIMBS( size );
MPI_VALIDATE_RET( X != NULL );
MPI_VALIDATE_RET( f_rng != NULL );
diff --git a/library/bignum_core.c b/library/bignum_core.c
index a05df99..431921a 100644
--- a/library/bignum_core.c
+++ b/library/bignum_core.c
@@ -185,7 +185,7 @@
const unsigned char *buf,
size_t buflen )
{
- size_t const limbs = CHARS_TO_LIMBS( buflen );
+ const size_t limbs = CHARS_TO_LIMBS( buflen );
if( nx < limbs )
return( MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL );