fix CYASSL_MALLOC_CHECK hard tabs and extra function not needed

pull/1/head
toddouska 2013-05-29 11:18:16 -07:00
parent af48800c58
commit b2ef938cbe
1 changed files with 6 additions and 10 deletions

View File

@ -31,12 +31,7 @@
#include <cyassl/ctaocrypt/error.h>
#ifdef CYASSL_MALLOC_CHECK
#include <stdio.h>
static void err_sys(const char* msg)
{
printf("error = %s\n", msg);
return;
}
#include <stdio.h>
#endif
/* Set these to default values initially. */
@ -77,10 +72,11 @@ void* CyaSSL_Malloc(size_t size)
res = malloc_function(size);
else
res = malloc(size);
#ifdef CYASSL_MALLOC_CHECK
if(res == NULL)
err_sys("CyaSSL_malloc") ;
#endif
#ifdef CYASSL_MALLOC_CHECK
if (res == NULL)
printf("CyaSSL_malloc failed\n");
#endif
return res;
}