dep-libtommath/mp_rand_source.c
Steffen Jaeckel 48a356883d Split up mp_rand_source.c
In order to make `helper.pl` happy, change the ternary operator to an
if-else statement, otherwise it won't properly generate `tommath_class.h`.

This fixes #582
This closes #583

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-01-30 14:59:53 +01:00

12 lines
344 B
C

#include "tommath_private.h"
#ifdef MP_RAND_SOURCE_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
void mp_rand_source(mp_err(*source)(void *out, size_t size))
{
if (source == NULL)
s_mp_rand_source = s_mp_rand_platform;
else
s_mp_rand_source = source;
}
#endif