From c99840ae1f3486f3d372958adeaf8fe7a544b318 Mon Sep 17 00:00:00 2001 From: Agathiyan Bragadeesh Date: Wed, 12 Jul 2023 11:15:46 +0100 Subject: [PATCH] Move declarations in mbedtls_mpi_add_abs to top Signed-off-by: Agathiyan Bragadeesh --- library/bignum.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/bignum.c b/library/bignum.c index 36effaf8d..ec24b151d 100644 --- a/library/bignum.c +++ b/library/bignum.c @@ -896,6 +896,8 @@ int mbedtls_mpi_add_abs(mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; size_t j; + mbedtls_mpi_uint *p; + mbedtls_mpi_uint c; MPI_VALIDATE_RET(X != NULL); MPI_VALIDATE_RET(A != NULL); MPI_VALIDATE_RET(B != NULL); @@ -929,9 +931,9 @@ int mbedtls_mpi_add_abs(mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi /* j is the number of non-zero limbs of B. Add those to X. */ - mbedtls_mpi_uint *p = X->p; + p = X->p; - mbedtls_mpi_uint c = mbedtls_mpi_core_add(p, p, B->p, j); + c = mbedtls_mpi_core_add(p, p, B->p, j); p += j;