From 001091fa720227a0075364b52c6778d8bdfacbd9 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 31 Dec 2017 16:06:11 -0500 Subject: svc: Cleanup svcGetThreadPriority. --- src/core/hle/svc.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index fd33a5971..0c53db1c5 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp @@ -149,10 +149,12 @@ static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id) } /// Gets the priority for the specified thread -static ResultCode GetThreadPriority(s32* priority, Kernel::Handle handle) { - LOG_TRACE(Kernel_SVC, "called, handle=0x%08X", handle); +static ResultCode GetThreadPriority(u32* priority, Handle handle) { const SharedPtr thread = Kernel::g_handle_table.Get(handle); - *priority = thread ? thread->GetPriority() : 0; + if (!thread) + return ERR_INVALID_HANDLE; + + *priority = thread->GetPriority(); return RESULT_SUCCESS; } -- cgit v1.2.3