simplifications: replace mp_mod_d by macro

This commit is contained in:
Daniel Mendler 2019-10-29 20:26:25 +01:00
parent 2d3262af26
commit e60149dec7
No known key found for this signature in database
GPG Key ID: D88ADB2A2693CA43
2 changed files with 1 additions and 11 deletions

View File

@ -1,10 +0,0 @@
#include "tommath_private.h"
#ifdef MP_MOD_D_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
mp_err mp_mod_d(const mp_int *a, mp_digit b, mp_digit *c)
{
return mp_div_d(a, b, NULL, c);
}
#endif

View File

@ -398,7 +398,7 @@ mp_err mp_mul_d(const mp_int *a, mp_digit b, mp_int *c) MP_WUR;
mp_err mp_div_d(const mp_int *a, mp_digit b, mp_int *c, mp_digit *d) MP_WUR;
/* c = a mod b, 0 <= c < b */
mp_err mp_mod_d(const mp_int *a, mp_digit b, mp_digit *c) MP_WUR;
#define mp_mod_d(a, b, c) mp_div_d((a), (b), NULL, (c))
/* ---> number theory <--- */