Commit ab074176abe93582681deffaf93027c7b47c3c9f

Francois Perrad 2018-12-27T09:38:26

explicit condition

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;
          }