Commit 0bf64256 authored by Niels Möller's avatar Niels Möller

Add missing assert.

parent dcda81d7
2017-08-26 Niels Möller <nisse@lysator.liu.se>
* ecc-mod-inv.c (ecc_mod_inv): Add missing assert. Fixes a
"dead increment" warning from the clang static analyzer.
2017-07-18 Niels Möller <nisse@lysator.liu.se> 2017-07-18 Niels Möller <nisse@lysator.liu.se>
* ecc-add-eh.c (ecc_add_eh): Fix in-place operation by reordering * ecc-add-eh.c (ecc_add_eh): Fix in-place operation by reordering
......
...@@ -145,6 +145,7 @@ ecc_mod_inv (const struct ecc_modulo *m, ...@@ -145,6 +145,7 @@ ecc_mod_inv (const struct ecc_modulo *m,
cnd_swap (swap, up, vp, n); cnd_swap (swap, up, vp, n);
cy = cnd_sub_n (odd, up, vp, n); cy = cnd_sub_n (odd, up, vp, n);
cy -= cnd_add_n (cy, up, m->m, n); cy -= cnd_add_n (cy, up, m->m, n);
assert (cy == 0);
cy = mpn_rshift (ap, ap, n, 1); cy = mpn_rshift (ap, ap, n, 1);
assert (cy == 0); assert (cy == 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment