diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-04-05 16:58:41 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-04-05 16:58:41 (GMT) |
commit | 689987ea924a8fded1801777c1a14ab1205fa826 (patch) | |
tree | 1da81fdd9a883d260a13d482dfba4a751bb35d8a /libtommath/bn_mp_init.c | |
parent | 7cb32717a995bee029ee18710b3e25e8e73f7377 (diff) | |
download | tcl-689987ea924a8fded1801777c1a14ab1205fa826.zip tcl-689987ea924a8fded1801777c1a14ab1205fa826.tar.gz tcl-689987ea924a8fded1801777c1a14ab1205fa826.tar.bz2 |
Take over improvements from libtommath's development branch (which will appear in next version).
- More efficient MP_SET_XLONG() macro.
- New internal macro's IS_ZERO/IS_EVEN/IS_ODD
- Changed signature for XMALLOC/XREALLOC/XFREE
Diffstat (limited to 'libtommath/bn_mp_init.c')
-rw-r--r-- | libtommath/bn_mp_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libtommath/bn_mp_init.c b/libtommath/bn_mp_init.c index 7520089..3c0c489 100644 --- a/libtommath/bn_mp_init.c +++ b/libtommath/bn_mp_init.c @@ -18,7 +18,7 @@ int mp_init(mp_int *a) int i; /* allocate memory required and clear it */ - a->dp = OPT_CAST(mp_digit) XMALLOC(sizeof(mp_digit) * (size_t)MP_PREC); + a->dp = (mp_digit *) XMALLOC(MP_PREC * sizeof(mp_digit)); if (a->dp == NULL) { return MP_MEM; } |