Skip to content

Commit 334c32e

Browse files
committed
fix signature
1 parent 89bac3a commit 334c32e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bn_mp_invmod.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/* SPDX-License-Identifier: Unlicense */
55

66
/* hac 14.61, pp608 */
7-
int mp_invmod(const mp_int *a, const mp_int *b, mp_int *c)
7+
mp_err mp_invmod(const mp_int *a, const mp_int *b, mp_int *c)
88
{
99
/* b cannot be negative and has to be >1 */
1010
if ((b->sign == MP_NEG) || (mp_cmp_d(b, 1uL) != MP_GT)) {

tommath_private.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ mp_err s_mp_rand_platform(void *p, size_t n) MP_WUR;
170170
void s_mp_reverse(unsigned char *s, int len);
171171

172172
/* TODO: jenkins prng is not thread safe as of now */
173-
MP_WUR int s_mp_rand_jenkins(void *p, size_t n);
173+
mp_err s_mp_rand_jenkins(void *p, size_t n) MP_WUR;
174174
void s_mp_rand_jenkins_init(uint64_t seed);
175175

176176
extern const char *const mp_s_rmap;
@@ -184,7 +184,7 @@ extern const size_t mp_s_rmap_reverse_sz;
184184
* b is the original value that should be set in the MPI.
185185
*/
186186
#define MP_SET_XLONG(func_name, type) \
187-
int func_name (mp_int * a, type b) \
187+
mp_err func_name (mp_int * a, type b) \
188188
{ \
189189
int x = 0; \
190190
mp_zero(a); \

0 commit comments

Comments
 (0)