Merge branch 'pr_403' into development-proposed
diff --git a/ChangeLog b/ChangeLog
index e0b016d..0ba0134 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
mbed TLS ChangeLog (Sorted per branch, date)
+= mbed TLS x.x.x branch released xxxx-xx-xx
+
+Changes
+ * Remove some redundant code in bignum.c. Contributed by Alexey Skalozub.
+
= mbed TLS 2.8.0 branch released 2018-03-16
Default behavior changes
diff --git a/library/bignum.c b/library/bignum.c
index 9f13da4..ff72d30 100644
--- a/library/bignum.c
+++ b/library/bignum.c
@@ -963,7 +963,7 @@
while( c != 0 )
{
z = ( *d < c ); *d -= c;
- c = z; i++; d++;
+ c = z; d++;
}
}
@@ -1201,8 +1201,8 @@
MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, i + j ) );
MBEDTLS_MPI_CHK( mbedtls_mpi_lset( X, 0 ) );
- for( i++; j > 0; j-- )
- mpi_mul_hlp( i - 1, A->p, X->p + j - 1, B->p[j - 1] );
+ for( ; j > 0; j-- )
+ mpi_mul_hlp( i, A->p, X->p + j - 1, B->p[j - 1] );
X->s = A->s * B->s;