Merge pull request #6027 from SparkiDev/sp_int_div_small

SP int: div small static code analysis change
pull/6030/head
András Fekete 2023-01-30 10:34:05 -05:00 committed by GitHub
commit d72ea6101f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -6377,7 +6377,7 @@ static void _sp_div_small(const sp_int* a, sp_int_digit d, sp_int* r,
/* Get top digit after multipling. */
tt = (t * m) >> SP_WORD_SIZE;
/* Subtract trial division. */
tr = (sp_int_digit)(t - tt * d);
tr = (sp_int_digit)t - (sp_int_digit)(tt * d);
#else
/* Multiply digit. */
SP_ASM_MUL(l, tt, a->dp[i], m);
@ -6404,7 +6404,7 @@ static void _sp_div_small(const sp_int* a, sp_int_digit d, sp_int* r,
/* Get top digit after multipling. */
tt = (t * m) >> SP_WORD_SIZE;
/* Subtract trial division. */
tr = (sp_int_digit)(t - tt * d);
tr = (sp_int_digit)t - (sp_int_digit)(tt * d);
#else
/* Multiply digit. */
SP_ASM_MUL(l, tt, a->dp[i], m);