Minor tidy-up

No functional difference, but looks better.
This commit is contained in:
Stephen Miller 2025-05-28 04:17:02 -05:00
parent 59a32eeb5d
commit 5e366a3442

View File

@ -574,7 +574,7 @@ void* PS4_SYSV_ABI posix_mmap(void* addr, u64 len, s32 prot, s32 flags, s32 fd,
const auto mem_prot = static_cast<Core::MemoryProt>(prot); const auto mem_prot = static_cast<Core::MemoryProt>(prot);
const auto mem_flags = static_cast<Core::MemoryMapFlags>(flags); const auto mem_flags = static_cast<Core::MemoryMapFlags>(flags);
s32 result = 0; s32 result = ORBIS_OK;
if (fd == -1) { if (fd == -1) {
result = memory->MapMemory(&addr_out, std::bit_cast<VAddr>(addr), len, mem_prot, mem_flags, result = memory->MapMemory(&addr_out, std::bit_cast<VAddr>(addr), len, mem_prot, mem_flags,
Core::VMAType::Flexible); Core::VMAType::Flexible);
@ -583,7 +583,7 @@ void* PS4_SYSV_ABI posix_mmap(void* addr, u64 len, s32 prot, s32 flags, s32 fd,
fd, phys_addr); fd, phys_addr);
} }
if (result < 0) { if (result != ORBIS_OK) {
// If the memory mappings fail, mmap sets errno to the appropriate error code, // If the memory mappings fail, mmap sets errno to the appropriate error code,
// then returns (void*)-1; // then returns (void*)-1;
ErrSceToPosix(result); ErrSceToPosix(result);
@ -605,7 +605,7 @@ s32 PS4_SYSV_ABI sceKernelMmap(void* addr, u64 len, s32 prot, s32 flags, s32 fd,
// Set the outputted address // Set the outputted address
*res = addr_out; *res = addr_out;
return 0; return ORBIS_OK;
} }
s32 PS4_SYSV_ABI sceKernelConfiguredFlexibleMemorySize(u64* sizeOut) { s32 PS4_SYSV_ABI sceKernelConfiguredFlexibleMemorySize(u64* sizeOut) {