test: Fix memtest callbacks

This commit is contained in:
Elms 2021-06-17 10:15:11 -07:00
parent a1517dbfe4
commit ad59b8af45

View File

@ -36540,8 +36540,15 @@ static int malloc_cnt = 0;
static int realloc_cnt = 0;
static int free_cnt = 0;
#ifdef WOLFSSL_DEBUG_MEMORY
static void *my_Malloc_cb(size_t size, const char* func, unsigned int line)
{
(void) func;
(void) line;
#else
static void *my_Malloc_cb(size_t size)
{
#endif
malloc_cnt++;
#ifndef WOLFSSL_NO_MALLOC
return malloc(size);
@ -36551,8 +36558,16 @@ static void *my_Malloc_cb(size_t size)
return NULL;
#endif
}
#ifdef WOLFSSL_DEBUG_MEMORY
static void my_Free_cb(void *ptr, const char* func, unsigned int line)
{
(void) func;
(void) line;
#else
static void my_Free_cb(void *ptr)
{
#endif
free_cnt++;
#ifndef WOLFSSL_NO_MALLOC
free(ptr);
@ -36561,8 +36576,16 @@ static void my_Free_cb(void *ptr)
(void)ptr;
#endif
}
#ifdef WOLFSSL_DEBUG_MEMORY
static void *my_Realloc_cb(void *ptr, size_t size, const char* func, unsigned int line)
{
(void) func;
(void) line;
#else
static void *my_Realloc_cb(void *ptr, size_t size)
{
#endif
realloc_cnt++;
#ifndef WOLFSSL_NO_MALLOC
return realloc(ptr, size);