1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-08 17:42:09 +03:00

Merge pull request #7934 from AgathiyanB/move-declarations-to-top

Move declarations to top of functions
This commit is contained in:
Dave Rodgman
2023-07-19 15:25:27 +01:00
committed by GitHub
4 changed files with 43 additions and 22 deletions

View File

@@ -5658,6 +5658,7 @@ static inline int ecp_mod_koblitz(mbedtls_mpi_uint *X,
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) {
@@ -5673,7 +5674,6 @@ static inline int ecp_mod_koblitz(mbedtls_mpi_uint *X,
goto cleanup;
}
mbedtls_mpi_uint mask = 0;
if (adjust != 0) {
mask = ((mbedtls_mpi_uint) 1 << shift) - 1;
}