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:
Axel Lin 2017-12-05 11:59:30 +08:00 committed by goldsimon
parent eb30dbfdc5
commit ec9f227eae

View File

@ -107,10 +107,8 @@ tls_malloc(size_t c, size_t len)
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));
}
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);