Commit 7ffc562d2867271003bc76ce02311473849affc3

Francois Perrad 2019-05-21T21:11:56

literal suffix

diff --git a/bn_mp_and.c b/bn_mp_and.c
index e781f31..c259f8d 100644
--- a/bn_mp_and.c
+++ b/bn_mp_and.c
@@ -26,7 +26,7 @@ mp_err mp_and(const mp_int *a, const mp_int *b, mp_int *c)
          x = ac & MP_MASK;
          ac >>= MP_DIGIT_BIT;
       } else {
-         x = (i >= a->used) ? 0 : a->dp[i];
+         x = (i >= a->used) ? 0uL : a->dp[i];
       }
 
       /* convert to two complement if negative */
@@ -35,7 +35,7 @@ mp_err mp_and(const mp_int *a, const mp_int *b, mp_int *c)
          y = bc & MP_MASK;
          bc >>= MP_DIGIT_BIT;
       } else {
-         y = (i >= b->used) ? 0 : b->dp[i];
+         y = (i >= b->used) ? 0uL : b->dp[i];
       }
 
       c->dp[i] = x & y;
diff --git a/bn_mp_or.c b/bn_mp_or.c
index 6f09a70..cdacbfb 100644
--- a/bn_mp_or.c
+++ b/bn_mp_or.c
@@ -26,7 +26,7 @@ mp_err mp_or(const mp_int *a, const mp_int *b, mp_int *c)
          x = ac & MP_MASK;
          ac >>= MP_DIGIT_BIT;
       } else {
-         x = (i >= a->used) ? 0 : a->dp[i];
+         x = (i >= a->used) ? 0uL : a->dp[i];
       }
 
       /* convert to two complement if negative */
@@ -35,7 +35,7 @@ mp_err mp_or(const mp_int *a, const mp_int *b, mp_int *c)
          y = bc & MP_MASK;
          bc >>= MP_DIGIT_BIT;
       } else {
-         y = (i >= b->used) ? 0 : b->dp[i];
+         y = (i >= b->used) ? 0uL : b->dp[i];
       }
 
       c->dp[i] = x | y;
diff --git a/bn_mp_xor.c b/bn_mp_xor.c
index 90958d4..71e7ca1 100644
--- a/bn_mp_xor.c
+++ b/bn_mp_xor.c
@@ -26,7 +26,7 @@ mp_err mp_xor(const mp_int *a, const mp_int *b, mp_int *c)
          x = ac & MP_MASK;
          ac >>= MP_DIGIT_BIT;
       } else {
-         x = (i >= a->used) ? 0 : a->dp[i];
+         x = (i >= a->used) ? 0uL : a->dp[i];
       }
 
       /* convert to two complement if negative */
@@ -35,7 +35,7 @@ mp_err mp_xor(const mp_int *a, const mp_int *b, mp_int *c)
          y = bc & MP_MASK;
          bc >>= MP_DIGIT_BIT;
       } else {
-         y = (i >= b->used) ? 0 : b->dp[i];
+         y = (i >= b->used) ? 0uL : b->dp[i];
       }
 
       c->dp[i] = x ^ y;