mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 18:14:53 +00:00
apps/altcp_tls: Remove redundant check for altcp_mbedtls_malloc_clear_stats
No need to check altcp_mbedtls_malloc_clear_stats twice. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: goldsimon <goldsimon@gmx.de>
This commit is contained in:
parent
eb30dbfdc5
commit
ec9f227eae
@ -106,12 +106,10 @@ tls_malloc(size_t c, size_t len)
|
||||
void *ret;
|
||||
size_t alloc_size;
|
||||
#if ALTCP_MBEDTLS_PLATFORM_ALLOC_STATS
|
||||
if (altcp_mbedtls_malloc_clear_stats) {
|
||||
if (altcp_mbedtls_malloc_clear_stats) {
|
||||
altcp_mbedtls_malloc_clear_stats = 0;
|
||||
memset(&altcp_mbedtls_malloc_stats, 0, sizeof(altcp_mbedtls_malloc_stats));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
alloc_size = sizeof(altcp_mbedtls_malloc_helper_t) + (c * len);
|
||||
/* check for maximum allocation size, mainly to prevent mem_size_t overflow */
|
||||
|
Loading…
Reference in New Issue
Block a user