]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Add missing assert.
authorNiels Möller <nisse@lysator.liu.se>
Sat, 26 Aug 2017 20:54:59 +0000 (22:54 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Sat, 26 Aug 2017 20:54:59 +0000 (22:54 +0200)
ChangeLog
ecc-mod-inv.c

index de6fc6dcdf24c5131077b94594e0d3e1068c2c76..3a027a610390b86879478e6f1fafc887815f12e1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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>
 
        * ecc-add-eh.c (ecc_add_eh): Fix in-place operation by reordering
index f65c9da42d9982c811d514a02cab3ad2a2ab9f1d..8cfd2e3b8c1f696178f48a927854d2f91517474f 100644 (file)
@@ -145,6 +145,7 @@ ecc_mod_inv (const struct ecc_modulo *m,
       cnd_swap (swap, up, vp, n);
       cy = cnd_sub_n (odd, up, vp, n);
       cy -= cnd_add_n (cy, up, m->m, n);
+      assert (cy == 0);
 
       cy = mpn_rshift (ap, ap, n, 1);
       assert (cy == 0);