diff --git a/bn_mp_complement.c b/bn_mp_complement.c index 256ddea..fae3a59 100644 --- a/bn_mp_complement.c +++ b/bn_mp_complement.c @@ -17,7 +17,7 @@ int mp_complement(const mp_int *a, mp_int *b) { int res = mp_neg(a, b); - return res == MP_OKAY ? mp_sub_d(b, 1, b) : res; + return res == MP_OKAY ? mp_sub_d(b, 1uL, b) : res; } #endif diff --git a/bn_mp_tc_and.c b/bn_mp_tc_and.c index 800681a..2969116 100644 --- a/bn_mp_tc_and.c +++ b/bn_mp_tc_and.c @@ -22,7 +22,7 @@ int mp_tc_and(const mp_int *a, const mp_int *b, mp_int *c) if (as || bs) { bits = MAX(mp_count_bits(a), mp_count_bits(b)); - res = mp_init_set_int(&_mx, 1); + res = mp_init_set_int(&_mx, 1uL); if (res != MP_OKAY) { goto end; } diff --git a/bn_mp_tc_div_2d.c b/bn_mp_tc_div_2d.c index f341c9b..88aa2f8 100644 --- a/bn_mp_tc_div_2d.c +++ b/bn_mp_tc_div_2d.c @@ -21,13 +21,13 @@ int mp_tc_div_2d(const mp_int *a, int b, mp_int *c) return mp_div_2d(a, b, c, NULL); } - res = mp_add_d(a, 1, c); + res = mp_add_d(a, 1uL, c); if (res != MP_OKAY) { return res; } res = mp_div_2d(c, b, c, NULL); - return res == MP_OKAY ? mp_sub_d(c, 1, c) : res; + return res == MP_OKAY ? mp_sub_d(c, 1uL, c) : res; } #endif diff --git a/bn_mp_tc_or.c b/bn_mp_tc_or.c index 344c20c..d3f1100 100644 --- a/bn_mp_tc_or.c +++ b/bn_mp_tc_or.c @@ -22,7 +22,7 @@ int mp_tc_or(const mp_int *a, const mp_int *b, mp_int *c) if (as || bs) { bits = MAX(mp_count_bits(a), mp_count_bits(b)); - res = mp_init_set_int(&_mx, 1); + res = mp_init_set_int(&_mx, 1uL); if (res != MP_OKAY) { goto end; } diff --git a/bn_mp_tc_xor.c b/bn_mp_tc_xor.c index 09547a5..e1de859 100644 --- a/bn_mp_tc_xor.c +++ b/bn_mp_tc_xor.c @@ -22,7 +22,7 @@ int mp_tc_xor(const mp_int *a, const mp_int *b, mp_int *c) if (as || bs) { bits = MAX(mp_count_bits(a), mp_count_bits(b)); - res = mp_init_set_int(&_mx, 1); + res = mp_init_set_int(&_mx, 1uL); if (res != MP_OKAY) { goto end; }