From b5aa1d3ef14100f963d4ec33aa8a8170fe97a673 Mon Sep 17 00:00:00 2001 From: Stephen Miller Date: Wed, 19 Feb 2025 22:07:53 -0600 Subject: [PATCH] Clang --- src/core/memory.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/memory.cpp b/src/core/memory.cpp index ab2a3b66b..6496b91f6 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -471,7 +471,7 @@ s64 MemoryManager::ProtectBytes(VAddr addr, VirtualMemoryArea vma_base, size_t s const auto start_in_vma = addr - vma_base.base; const auto adjusted_size = vma_base.size - start_in_vma < size ? vma_base.size - start_in_vma : size; - + if (vma_base.type == VMAType::Free) { LOG_ERROR(Kernel_Vmm, "Cannot change protection on free memory region"); return ORBIS_KERNEL_ERROR_EINVAL; @@ -484,8 +484,8 @@ s64 MemoryManager::ProtectBytes(VAddr addr, VirtualMemoryArea vma_base, size_t s MemoryProt invalid_flags = prot & ~valid_flags; if (u32(invalid_flags) != 0 && u32(invalid_flags) != u32(MemoryProt::NoAccess)) { - LOG_ERROR(Kernel_Vmm, "Invalid protection flags: prot = {:#x}, invalid flags = {:#x}", u32(prot), - u32(invalid_flags)); + LOG_ERROR(Kernel_Vmm, "Invalid protection flags: prot = {:#x}, invalid flags = {:#x}", + u32(prot), u32(invalid_flags)); return ORBIS_KERNEL_ERROR_EINVAL; }