1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-21 21:22:31 +03:00

OOM: avoid warn when calling *alloc(0) (#7909)

This commit is contained in:
david gauchard
2021-03-04 22:27:42 +01:00
committed by GitHub
parent d3d49d5db4
commit 9fc5afd5fd

View File

@ -194,8 +194,8 @@ void ICACHE_RAM_ATTR print_oom_size(size_t size)
}
}
#define OOM_CHECK__PRINT_OOM(p, s) if (!p) print_oom_size(s)
#define OOM_CHECK__PRINT_LOC(p, s, f, l) if (!p) print_loc(s, f, l)
#define OOM_CHECK__PRINT_OOM(p, s) if ((s) && !(p)) print_oom_size(s)
#define OOM_CHECK__PRINT_LOC(p, s, f, l) if ((s) && !(p)) print_loc(s, f, l)
#else // ! DEBUG_ESP_OOM