From fb9a7f36d45221a8440cdcbf50e38d87229a5ba3 Mon Sep 17 00:00:00 2001 From: Guillaume Souchere Date: Wed, 25 Jan 2023 08:33:37 +0100 Subject: [PATCH] heap: replace usage of bzero() with memset() across the component See https://github.com/espressif/esp-idf/issues/5095 --- components/heap/heap_caps.c | 4 ++-- components/heap/heap_caps_linux.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/heap/heap_caps.c b/components/heap/heap_caps.c index e28653f69c..850324682b 100644 --- a/components/heap/heap_caps.c +++ b/components/heap/heap_caps.c @@ -456,7 +456,7 @@ IRAM_ATTR static void *heap_caps_calloc_base( size_t n, size_t size, uint32_t ca result = heap_caps_malloc_base(size_bytes, caps); if (result != NULL) { - bzero(result, size_bytes); + memset(result, 0, size_bytes); } return result; } @@ -517,7 +517,7 @@ size_t heap_caps_get_largest_free_block( uint32_t caps ) void heap_caps_get_info( multi_heap_info_t *info, uint32_t caps ) { - bzero(info, sizeof(multi_heap_info_t)); + memset(info, 0, sizeof(multi_heap_info_t)); heap_t *heap; SLIST_FOREACH(heap, ®istered_heaps, next) { diff --git a/components/heap/heap_caps_linux.c b/components/heap/heap_caps_linux.c index 622b220334..981f861674 100644 --- a/components/heap/heap_caps_linux.c +++ b/components/heap/heap_caps_linux.c @@ -159,7 +159,7 @@ size_t heap_caps_get_largest_free_block( uint32_t caps ) void heap_caps_get_info( multi_heap_info_t *info, uint32_t caps ) { - bzero(info, sizeof(multi_heap_info_t)); + memset(info, 0, sizeof(multi_heap_info_t)); } void heap_caps_print_heap_info( uint32_t caps )