summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/svc/svc_query_memory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/svc/svc_query_memory.cpp')
-rw-r--r--src/core/hle/kernel/svc/svc_query_memory.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/kernel/svc/svc_query_memory.cpp b/src/core/hle/kernel/svc/svc_query_memory.cpp
index ee75ad370..457ebf950 100644
--- a/src/core/hle/kernel/svc/svc_query_memory.cpp
+++ b/src/core/hle/kernel/svc/svc_query_memory.cpp
@@ -15,8 +15,8 @@ Result QueryMemory(Core::System& system, uint64_t out_memory_info, PageInfo* out
out_memory_info, query_address);
// Query memory is just QueryProcessMemory on the current process.
- return QueryProcessMemory(system, out_memory_info, out_page_info, CurrentProcess,
- query_address);
+ R_RETURN(
+ QueryProcessMemory(system, out_memory_info, out_page_info, CurrentProcess, query_address));
}
Result QueryProcessMemory(Core::System& system, uint64_t out_memory_info, PageInfo* out_page_info,
@@ -27,13 +27,13 @@ Result QueryProcessMemory(Core::System& system, uint64_t out_memory_info, PageIn
if (process.IsNull()) {
LOG_ERROR(Kernel_SVC, "Process handle does not exist, process_handle=0x{:08X}",
process_handle);
- return ResultInvalidHandle;
+ R_THROW(ResultInvalidHandle);
}
auto& memory{system.Memory()};
const auto memory_info{process->PageTable().QueryInfo(address).GetSvcMemoryInfo()};
- memory.WriteBlock(out_memory_info, &memory_info, sizeof(memory_info));
+ memory.WriteBlock(out_memory_info, std::addressof(memory_info), sizeof(memory_info));
//! This is supposed to be part of the QueryInfo call.
*out_page_info = {};