diff --git a/wolfcrypt/src/memory.c b/wolfcrypt/src/memory.c index dc50895148..e3a2bb5d07 100644 --- a/wolfcrypt/src/memory.c +++ b/wolfcrypt/src/memory.c @@ -991,17 +991,10 @@ void* wolfSSL_Malloc(size_t size, void* heap, int type) break; } #ifdef WOLFSSL_DEBUG_STATIC_MEMORY - #ifdef WOLFSSL_ZEPHYR else { - fprintf(stderr, "Size: %zu, Empty: %d\n", size, + fprintf(stderr, "Size: %lu, Empty: %d\n", (unsigned long) size, mem->sizeList[i]); } - #else - else { - fprintf(stderr, "Size: %ld, Empty: %d\n", size, - mem->sizeList[i]); - } - #endif #endif } } @@ -1036,13 +1029,8 @@ void* wolfSSL_Malloc(size_t size, void* heap, int type) else { WOLFSSL_MSG("ERROR ran out of static memory"); #ifdef WOLFSSL_DEBUG_MEMORY - #ifdef WOLFSSL_ZEPHYR - fprintf(stderr, "Looking for %zu bytes at %s:%d\n", size, func, - line); - #else - fprintf(stderr, "Looking for %lu bytes at %s:%d\n", size, func, + fprintf(stderr, "Looking for %lu bytes at %s:%d\n", (unsigned long) size, func, line); - #endif #endif } diff --git a/zephyr/user_settings-no-malloc.h b/zephyr/user_settings-no-malloc.h index dece0ea817..5a5ca131c7 100644 --- a/zephyr/user_settings-no-malloc.h +++ b/zephyr/user_settings-no-malloc.h @@ -129,6 +129,7 @@ extern "C" { #undef HAVE_FFDHE_2048 #define HAVE_FFDHE_2048 +#undef WOLFSSL_NO_MALLOC #define WOLFSSL_NO_MALLOC //#define WOLFSSL_DEBUG_STATIC_MEMORY //#define WOLFSSL_DEBUG_MEMORY_PRINT