fix signature
diff --git a/bn_mp_invmod.c b/bn_mp_invmod.c
index 9105eeb..d5d6bbc 100644
--- a/bn_mp_invmod.c
+++ b/bn_mp_invmod.c
@@ -4,7 +4,7 @@
/* SPDX-License-Identifier: Unlicense */
/* hac 14.61, pp608 */
-int mp_invmod(const mp_int *a, const mp_int *b, mp_int *c)
+mp_err mp_invmod(const mp_int *a, const mp_int *b, mp_int *c)
{
/* b cannot be negative and has to be >1 */
if ((b->sign == MP_NEG) || (mp_cmp_d(b, 1uL) != MP_GT)) {
diff --git a/tommath_private.h b/tommath_private.h
index 5575a88..521b1bc 100644
--- a/tommath_private.h
+++ b/tommath_private.h
@@ -170,7 +170,7 @@ mp_err s_mp_rand_platform(void *p, size_t n) MP_WUR;
void s_mp_reverse(unsigned char *s, int len);
/* TODO: jenkins prng is not thread safe as of now */
-MP_WUR int s_mp_rand_jenkins(void *p, size_t n);
+mp_err s_mp_rand_jenkins(void *p, size_t n) MP_WUR;
void s_mp_rand_jenkins_init(uint64_t seed);
extern const char *const mp_s_rmap;
@@ -184,7 +184,7 @@ extern const size_t mp_s_rmap_reverse_sz;
* b is the original value that should be set in the MPI.
*/
#define MP_SET_XLONG(func_name, type) \
-int func_name (mp_int * a, type b) \
+mp_err func_name (mp_int * a, type b) \
{ \
int x = 0; \
mp_zero(a); \