mirror of https://github.com/wolfSSL/wolfssl.git
fix CYASSL_MALLOC_CHECK hard tabs and extra function not needed
parent
af48800c58
commit
b2ef938cbe
|
@ -31,12 +31,7 @@
|
||||||
#include <cyassl/ctaocrypt/error.h>
|
#include <cyassl/ctaocrypt/error.h>
|
||||||
|
|
||||||
#ifdef CYASSL_MALLOC_CHECK
|
#ifdef CYASSL_MALLOC_CHECK
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
static void err_sys(const char* msg)
|
|
||||||
{
|
|
||||||
printf("error = %s\n", msg);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Set these to default values initially. */
|
/* Set these to default values initially. */
|
||||||
|
@ -77,10 +72,11 @@ void* CyaSSL_Malloc(size_t size)
|
||||||
res = malloc_function(size);
|
res = malloc_function(size);
|
||||||
else
|
else
|
||||||
res = malloc(size);
|
res = malloc(size);
|
||||||
#ifdef CYASSL_MALLOC_CHECK
|
|
||||||
if(res == NULL)
|
#ifdef CYASSL_MALLOC_CHECK
|
||||||
err_sys("CyaSSL_malloc") ;
|
if (res == NULL)
|
||||||
#endif
|
printf("CyaSSL_malloc failed\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue