summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2021-02-04 03:56:20 +0100
committerLioncash <mathew1800@gmail.com>2021-02-06 10:08:27 +0100
commit40ab2b934805e80b0a54d390b7b58291c37af36f (patch)
treeb1257724da679a47e482bd2931b36260b846abef
parentk_address_arbiter: Remove unnecessary usages of std::addressof (diff)
downloadyuzu-40ab2b934805e80b0a54d390b7b58291c37af36f.tar
yuzu-40ab2b934805e80b0a54d390b7b58291c37af36f.tar.gz
yuzu-40ab2b934805e80b0a54d390b7b58291c37af36f.tar.bz2
yuzu-40ab2b934805e80b0a54d390b7b58291c37af36f.tar.lz
yuzu-40ab2b934805e80b0a54d390b7b58291c37af36f.tar.xz
yuzu-40ab2b934805e80b0a54d390b7b58291c37af36f.tar.zst
yuzu-40ab2b934805e80b0a54d390b7b58291c37af36f.zip
-rw-r--r--src/core/hle/kernel/k_address_arbiter.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/core/hle/kernel/k_address_arbiter.cpp b/src/core/hle/kernel/k_address_arbiter.cpp
index 3c3e51dbe..d0e90fd60 100644
--- a/src/core/hle/kernel/k_address_arbiter.cpp
+++ b/src/core/hle/kernel/k_address_arbiter.cpp
@@ -118,9 +118,10 @@ ResultCode KAddressArbiter::SignalAndIncrementIfEqual(VAddr addr, s32 value, s32
// Check the userspace value.
s32 user_value{};
- R_UNLESS(UpdateIfEqual(system, &user_value, addr, value, value + 1),
- Svc::ResultInvalidCurrentMemory);
-
+ if (!UpdateIfEqual(system, &user_value, addr, value, value + 1)) {
+ LOG_ERROR(Kernel, "Invalid current memory!");
+ return Svc::ResultInvalidCurrentMemory;
+ }
if (user_value != value) {
return Svc::ResultInvalidState;
}
@@ -186,8 +187,10 @@ ResultCode KAddressArbiter::SignalAndModifyByWaitingCountIfEqual(VAddr addr, s32
succeeded = ReadFromUser(system, &user_value, addr);
}
- R_UNLESS(succeeded, Svc::ResultInvalidCurrentMemory);
-
+ if (!succeeded) {
+ LOG_ERROR(Kernel, "Invalid current memory!");
+ return Svc::ResultInvalidCurrentMemory;
+ }
if (user_value != value) {
return Svc::ResultInvalidState;
}