Move declaration in ecp_mod_koblitz to top
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com>
diff --git a/library/ecp_curves.c b/library/ecp_curves.c
index a4fa663..4203dd1 100644
--- a/library/ecp_curves.c
+++ b/library/ecp_curves.c
@@ -5657,6 +5657,7 @@
size_t shift = bits % biL;
size_t adjust = (shift + biL - 1) / biL;
size_t P_limbs = bits / biL + adjust;
+ mbedtls_mpi_uint mask = 0;
mbedtls_mpi_uint *A1 = mbedtls_calloc(P_limbs, ciL);
if (A1 == NULL) {
@@ -5672,7 +5673,6 @@
goto cleanup;
}
- mbedtls_mpi_uint mask = 0;
if (adjust != 0) {
mask = ((mbedtls_mpi_uint) 1 << shift) - 1;
}