Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Bill Phipps <bill@wolfssl.com>
  • Loading branch information
julek-wolfssl and billphipps committed May 7, 2024
1 parent 77a6481 commit 589bdba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
16 changes: 2 additions & 14 deletions wolfcrypt/src/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down Expand Up @@ -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
}

Expand Down
1 change: 1 addition & 0 deletions zephyr/user_settings-no-malloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 589bdba

Please sign in to comment.