Skip to content

Commit 7fdd6b5

Browse files
committed
literal suffix instead of cast
1 parent 7ffc562 commit 7fdd6b5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

bn_mp_count_bits.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ int mp_count_bits(const mp_int *a)
1919

2020
/* take the last digit and count the bits in it */
2121
q = a->dp[a->used - 1];
22-
while (q > (mp_digit)0) {
22+
while (q > 0u) {
2323
++r;
24-
q >>= (mp_digit)1;
24+
q >>= 1u;
2525
}
2626
return r;
2727
}

bn_mp_ilogb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ static mp_digit s_digit_ilogb(mp_digit base, mp_digit n)
2424
mp_digit ret, high = 1uL, low = 0uL, mid;
2525

2626
if (n < base) {
27-
return (mp_digit)0uL;
27+
return 0uL;
2828
}
2929
if (n == base) {
30-
return (mp_digit)1uL;
30+
return 1uL;
3131
}
3232

3333
bracket_high = (mp_word) base ;

0 commit comments

Comments
 (0)