From f1e6de796410e3aa9ac462d536d52b838b71ec41 Mon Sep 17 00:00:00 2001 From: SG Date: Tue, 9 Apr 2024 17:10:59 +0300 Subject: [PATCH] aligned_alloc, parameters order --- furi/core/memmgr.c | 2 +- lib/flipper_application/elf/elf_file.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/furi/core/memmgr.c b/furi/core/memmgr.c index 6c89378506..768d448904 100644 --- a/furi/core/memmgr.c +++ b/furi/core/memmgr.c @@ -38,7 +38,7 @@ char* strdup(const char* s) { return y; } -void* aligned_alloc(size_t size, size_t alignment) { +void* aligned_alloc(size_t alignment, size_t size) { return pvPortAllocAligned(size, alignment); } diff --git a/lib/flipper_application/elf/elf_file.c b/lib/flipper_application/elf/elf_file.c index 80d86b6375..e117e546a2 100644 --- a/lib/flipper_application/elf/elf_file.c +++ b/lib/flipper_application/elf/elf_file.c @@ -461,7 +461,7 @@ static bool elf_load_section_data(ELFFile* elf, ELFSection* section, Elf32_Shdr* return true; } - section->data = aligned_alloc(section_header->sh_size, section_header->sh_addralign); + section->data = aligned_alloc(section_header->sh_addralign, section_header->sh_size); section->size = section_header->sh_size; if(section_header->sh_type == SHT_NOBITS) {