Commit a91eb5a0d9009651a9998db90e5dcb0330833747

Jan Nijtmans 2019-11-12T14:29:02

fix build (hopefully)

diff --git a/demo/test.c b/demo/test.c
index 94a7ca2..1391ee0 100644
--- a/demo/test.c
+++ b/demo/test.c
@@ -625,7 +625,7 @@ static int test_mp_get_u32(void)
    DOR(mp_init_multi(&a, &b, NULL));
 
    for (i = 0; i < 1000; ++i) {
-      t = (unsigned long)rand_long() & 0xFFFFFFFFuL;
+      t = (unsigned long)rand_long() & (unsigned long)UINT32_MAX;
       mp_set_ul(&a, t);
       if (t != mp_get_u32(&a)) {
          printf("\nmp_get_u32() bad result!");
@@ -637,8 +637,8 @@ static int test_mp_get_u32(void)
       printf("\nmp_get_u32() bad result!");
       goto LBL_ERR;
    }
-   mp_set_ul(&a, 0xFFFFFFFFuL);
-   if (mp_get_u32(&a) != 0xFFFFFFFFuL) {
+   mp_set_ul(&a, (unsigned long)UINT32_MAX);
+   if (mp_get_u32(&a) != UINT32_MAX) {
       printf("\nmp_get_u32() bad result!");
       goto LBL_ERR;
    }
diff --git a/demo/timing.c b/demo/timing.c
index 4385a08..76ca01f 100644
--- a/demo/timing.c
+++ b/demo/timing.c
@@ -47,7 +47,7 @@ static unsigned long lfsr = 0xAAAAAAAAuL;
 static unsigned int lbit(void)
 {
    if ((lfsr & 0x80000000uL) != 0uL) {
-      lfsr = ((lfsr << 1) ^ 0x8000001BuL) & 0xFFFFFFFFuL;
+      lfsr = ((lfsr << 1) ^ 0x8000001BuL) & (unsigned long)UINT32_MAX;
       return 1u;
    } else {
       lfsr <<= 1;