Skip to content

Commit

Permalink
Merge branch 'feature/heap-replace-bzero-call-with-memset' into 'master'
Browse files Browse the repository at this point in the history
heap: replace usage of bzero() with memset() across the component

Closes IDFGH-3073

See merge request espressif/esp-idf!22125
  • Loading branch information
Zim Kalinowski committed Jan 25, 2023
2 parents de42b29 + fb9a7f3 commit 4757099
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions components/heap/heap_caps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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, &registered_heaps, next) {
Expand Down
2 changes: 1 addition & 1 deletion components/heap/heap_caps_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit 4757099

Please sign in to comment.