From 98c6349d4af30a444ff90d855a5f44d297600aca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Mon, 29 Dec 2014 23:22:54 +0000 Subject: [PATCH] In mpi_zero(), save a memset() if the target is already zero. --- lib/mpi/mpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mpi/mpi.c b/lib/mpi/mpi.c index 6bd8364..2d54be7 100644 --- a/lib/mpi/mpi.c +++ b/lib/mpi/mpi.c @@ -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;