Skip to content

Commit 4b90db4

Browse files
committed
Merge pull request #1314 from gtalusan/master
fix undefined DEBUG_TLS_MEM_PRINT hiding return statement
2 parents 304bf08 + c3de285 commit 4b90db4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

libraries/ESP8266WiFi/src/WiFiClientSecure.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -493,8 +493,9 @@ extern "C" void* ax_port_malloc(size_t size, const char* file, int line) {
493493
DEBUG_TLS_MEM_PRINT("%s:%d malloc %d failed, left %d\r\n", file, line, size, ESP.getFreeHeap());
494494
panic();
495495
}
496-
if (size >= 1024)
496+
if (size >= 1024) {
497497
DEBUG_TLS_MEM_PRINT("%s:%d malloc %d, left %d\r\n", file, line, size, ESP.getFreeHeap());
498+
}
498499
return result;
499500
}
500501

@@ -510,15 +511,17 @@ extern "C" void* ax_port_realloc(void* ptr, size_t size, const char* file, int l
510511
DEBUG_TLS_MEM_PRINT("%s:%d realloc %d failed, left %d\r\n", file, line, size, ESP.getFreeHeap());
511512
panic();
512513
}
513-
if (size >= 1024)
514+
if (size >= 1024) {
514515
DEBUG_TLS_MEM_PRINT("%s:%d realloc %d, left %d\r\n", file, line, size, ESP.getFreeHeap());
516+
}
515517
return result;
516518
}
517519

518520
extern "C" void ax_port_free(void* ptr) {
519521
free(ptr);
520522
uint32_t *p = (uint32_t*) ptr;
521523
size_t size = p[-3];
522-
if (size >= 1024)
524+
if (size >= 1024) {
523525
DEBUG_TLS_MEM_PRINT("free %d, left %d\r\n", p[-3], ESP.getFreeHeap());
526+
}
524527
}

0 commit comments

Comments
 (0)