Skip to content

Commit 28e58b9

Browse files
committed
Use right *_set and cast the value
1 parent bc24bbe commit 28e58b9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bn_mp_todecimal_fast.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ mp_err mp_todecimal_fast(mp_int *number, char **result) {
8383
}
8484
*result[0] = '-';
8585
}
86-
if ((err = mp_init_set(&n, 1000)) != MP_OKAY) {
86+
if ((err = mp_init_set(&n, (mp_digit)1000)) != MP_OKAY) {
8787
goto LBL_ERR;
8888
}
8989

@@ -92,7 +92,7 @@ mp_err mp_todecimal_fast(mp_int *number, char **result) {
9292
goto LBL_ERR;
9393
}
9494

95-
if ((err = mp_init_set(&shift, 20)) != MP_OKAY) {
95+
if ((err = mp_init_set(&shift, (mp_digit)20)) != MP_OKAY) {
9696
goto LBL_ERR;
9797
}
9898

@@ -102,13 +102,13 @@ mp_err mp_todecimal_fast(mp_int *number, char **result) {
102102
}
103103

104104
/* (8 * 2**$shift) / $n rounded up */
105-
if ((err = mp_init_set(&M, 8389)) != MP_OKAY) {
105+
if ((err = mp_init_set(&M, (mp_digit)8389)) != MP_OKAY) {
106106
goto LBL_ERR;
107107
}
108108

109109
/* $M / 8, rounded up */
110110
mL = malloc(20 * sizeof(mp_int));
111-
if ((err = mp_init_set(&mL[0], 1049)) != MP_OKAY) {
111+
if ((err = mp_init_set(&mL[0], (mp_digit)1049)) != MP_OKAY) {
112112
goto LBL_ERR;
113113
}
114114

0 commit comments

Comments
 (0)