mirror of https://github.com/wolfSSL/wolfssl.git
Merge pull request #3566 from douzzer/STACK_SIZE_CHECKPOINT_WITH_MAX_CHECK-decl-order
C89 decl order in STACK_SIZE_CHECKPOINT_WITH_MAX_CHECK()pull/3562/head
commit
65d0cc62fd
|
@ -71,7 +71,6 @@
|
|||
#endif
|
||||
|
||||
|
||||
#if (!defined(WOLFSSL_SP_MATH) && !defined(WOLFSSL_SP_MATH_ALL))
|
||||
int get_digit_count(mp_int* a)
|
||||
{
|
||||
if (a == NULL)
|
||||
|
@ -79,7 +78,6 @@ int get_digit_count(mp_int* a)
|
|||
|
||||
return a->used;
|
||||
}
|
||||
#endif
|
||||
|
||||
mp_digit get_digit(mp_int* a, int n)
|
||||
{
|
||||
|
|
|
@ -2130,9 +2130,10 @@ int StackSizeHWMReset(void)
|
|||
|
||||
#define STACK_SIZE_CHECKPOINT_WITH_MAX_CHECK(max, ...) ({ \
|
||||
ssize_t HWM = StackSizeHWM_OffsetCorrected(); \
|
||||
int _ret; \
|
||||
__VA_ARGS__; \
|
||||
printf("relative stack used = %ld\n", HWM); \
|
||||
int _ret = StackSizeHWMReset(); \
|
||||
_ret = StackSizeHWMReset(); \
|
||||
if ((max >= 0) && (HWM > (ssize_t)(max))) { \
|
||||
printf("relative stack usage at %s L%d exceeds designated max %ld.\n", __FILE__, __LINE__, (ssize_t)(max)); \
|
||||
_ret = -1; \
|
||||
|
|
|
@ -558,11 +558,6 @@ typedef struct sp_ecc_ctx {
|
|||
} \
|
||||
a->used = ii + 1; \
|
||||
} while (0)
|
||||
/* Get the count of digits in the multi-precision number.
|
||||
*
|
||||
* @param [in] a SP integer to use.
|
||||
*/
|
||||
#define sp_get_digit_count(a) (((a) == NULL) ? 0 : ((sp_int*)(a))->used)
|
||||
|
||||
/* Check the compiled and linked math implementation are the same.
|
||||
* Use the number of bits in a digit as indication of how code was compiled.
|
||||
|
@ -819,7 +814,6 @@ WOLFSSL_API word32 CheckRunTimeFastMath(void);
|
|||
#define mp_abs sp_abs
|
||||
#define mp_isneg sp_isneg
|
||||
#define mp_clamp sp_clamp
|
||||
#define get_digit_count sp_get_digit_count
|
||||
|
||||
/* One to one mappings. */
|
||||
#define mp_init sp_init
|
||||
|
|
Loading…
Reference in New Issue