Commit cc703a849bade89f26ce3493991e2e48cd9cbfb5

Francois Perrad 2019-05-11T12:09:59

add missing parameter name in prototype

diff --git a/bn_mp_rand.c b/bn_mp_rand.c
index 5a3a1d3..607a659 100644
--- a/bn_mp_rand.c
+++ b/bn_mp_rand.c
@@ -161,7 +161,7 @@ static int s_mp_rand_source_platform(void *p, size_t n)
 #endif
 }
 
-int (*s_rand_source)(void *, size_t) = s_mp_rand_source_platform;
+int (*s_rand_source)(void *out, size_t size) = s_mp_rand_source_platform;
 
 void mp_rand_source(int (*get)(void *out, size_t size))
 {
diff --git a/tommath.h b/tommath.h
index b5119fe..2954839 100644
--- a/tommath.h
+++ b/tommath.h
@@ -306,7 +306,7 @@ int mp_rand(mp_int *a, int digits);
 /* makes a pseudo-random small int of a given size */
 MP_DEPRECATED(mp_rand) int mp_rand_digit(mp_digit *r);
 /* use custom random data source instead of source provided the platform */
-void mp_rand_source(int source(void *, size_t));
+void mp_rand_source(int source(void *out, size_t size));
 
 #ifdef MP_PRNG_ENABLE_LTM_RNG
 #  warning MP_PRNG_ENABLE_LTM_RNG has been deprecated, use mp_rand_source instead.
diff --git a/tommath_private.h b/tommath_private.h
index fc836f2..053b3be 100644
--- a/tommath_private.h
+++ b/tommath_private.h
@@ -70,7 +70,7 @@ extern void MP_FREE(void *mem, size_t size);
 #define MP_MAXFAST              (int)(1u << (MP_SIZEOF_BITS(mp_word) - (2u * (size_t)MP_DIGIT_BIT)))
 
 /* random number source */
-extern int (*s_rand_source)(void *, size_t);
+extern int (*s_rand_source)(void *out, size_t size);
 
 /* lowlevel functions, do not call! */
 int s_mp_add(const mp_int *a, const mp_int *b, mp_int *c);