-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 Signed-off-by: Steffen Jaeckel <[email protected]>
- Loading branch information
Showing
2 changed files
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
#include "tommath_private.h" | ||
#ifdef MP_RAND_C | ||
#ifdef MP_RAND_SOURCE_C | ||
/* LibTomMath, multiple-precision integer library -- Tom St Denis */ | ||
/* SPDX-License-Identifier: Unlicense */ | ||
|
||
mp_err(*s_mp_rand_source)(void *out, size_t size) = s_mp_rand_platform; | ||
|
||
void mp_rand_source(mp_err(*source)(void *out, size_t size)) | ||
{ | ||
s_mp_rand_source = (source == NULL) ? s_mp_rand_platform : source; | ||
if (source == NULL) | ||
s_mp_rand_source = s_mp_rand_platform; | ||
else | ||
s_mp_rand_source = source; | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include "tommath_private.h" | ||
#ifdef S_MP_RAND_SOURCE_C | ||
/* LibTomMath, multiple-precision integer library -- Tom St Denis */ | ||
/* SPDX-License-Identifier: Unlicense */ | ||
|
||
mp_err(*s_mp_rand_source)(void *out, size_t size) = s_mp_rand_platform; | ||
#endif |