diff --git a/mm/mm_heap/mm_free.c b/mm/mm_heap/mm_free.c index 5513ba1772..e281ec919a 100644 --- a/mm/mm_heap/mm_free.c +++ b/mm/mm_heap/mm_free.c @@ -139,8 +139,8 @@ void mm_free(FAR struct mm_heap_s *heap, FAR void *mem) /* Then merge the two chunks */ node->size += next->size; - andbeyond->preceding = node->size | - (andbeyond->preceding & MM_ALLOC_BIT); + andbeyond->preceding = node->size | + (andbeyond->preceding & MM_ALLOC_BIT); next = (FAR struct mm_freenode_s *)andbeyond; } diff --git a/mm/shm/shmget.c b/mm/shm/shmget.c index 5df04d133a..c28cc3146f 100644 --- a/mm/shm/shmget.c +++ b/mm/shm/shmget.c @@ -151,7 +151,7 @@ static int shm_reserve(key_t key, int shmflg) static int shm_extend(int shmid, size_t size) { - FAR struct shm_region_s *region = &g_shminfo.si_region[shmid]; + FAR struct shm_region_s *region = &g_shminfo.si_region[shmid]; unsigned int pgalloc; unsigned int pgneeded;