From ab074176abe93582681deffaf93027c7b47c3c9f Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Thu, 27 Dec 2018 09:38:26 +0100 Subject: [PATCH] explicit condition --- demo/demo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/demo/demo.c b/demo/demo.c index 2e630ad..a93ce1d 100644 --- a/demo/demo.c +++ b/demo/demo.c @@ -560,7 +560,7 @@ int main(void) return EXIT_FAILURE; } t <<= 1; - } while (t); + } while (t != 0uL); } printf("\n\nTesting: mp_get_long_long\n"); @@ -580,7 +580,7 @@ int main(void) return EXIT_FAILURE; } r <<= 1; - } while (r); + } while (r != 0uLL); } /* test mp_sqrt */ @@ -815,7 +815,7 @@ int main(void) mp_copy(&c, &b); mp_mod(&c, &a, &c); mp_reduce_2k(&b, &a, 2uL); - if (mp_cmp(&c, &b)) { + if (mp_cmp(&c, &b) != MP_EQ) { printf("FAILED\n"); return EXIT_FAILURE; }