summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/mpi/mpicoder.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mpi/mpicoder.c b/lib/mpi/mpicoder.c
index 6bb52beb06b0..d8b372b9cc11 100644
--- a/lib/mpi/mpicoder.c
+++ b/lib/mpi/mpicoder.c
@@ -402,14 +402,14 @@ int mpi_write_to_sgl(MPI a, struct scatterlist *sgl, unsigned *nbytes,
#else
#error please implement for this limb size.
#endif
- if (lzeros > 0) {
+ if (lzeros) {
mpi_limb_t *limb1 = (void *)p - sizeof(alimb);
mpi_limb_t *limb2 = (void *)p - sizeof(alimb)
+ lzeros;
*limb1 = *limb2;
p -= lzeros;
y = lzeros;
- lzeros -= sizeof(alimb);
+ lzeros = 0;
}
p = p - (sizeof(alimb) - y);