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> #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;
} }