In mpi_zero(), save a memset() if the target is already zero.

This commit is contained in:
Dag-Erling Smørgrav 2014-12-29 23:22:54 +00:00 committed by des
parent 1412dac680
commit 98c6349d4a

View file

@ -109,7 +109,7 @@ mpi_zero(cryb_mpi *X)
if (X->words == NULL) {
MPI_FAST_INIT(X);
} else {
} else if (X->msb != 0) {
memset(X->words, 0, X->size);
X->neg = 0;
X->msb = 0;