Skip to content

Commit

Permalink
OOM: avoid warn when calling *alloc(0) (#7909)
Browse files Browse the repository at this point in the history
  • Loading branch information
d-a-v authored Mar 4, 2021
1 parent d3d49d5 commit 9fc5afd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cores/esp8266/heap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9fc5afd

Please sign in to comment.