diff --git a/include/stratosphere/event.hpp b/include/stratosphere/event.hpp index 153cdd0d..e6dae1f7 100644 --- a/include/stratosphere/event.hpp +++ b/include/stratosphere/event.hpp @@ -123,7 +123,7 @@ static IEvent *CreateSystemEvent(F f, bool autoclear = false) { template static IEvent *CreateWriteOnlySystemEvent() { - return CreateSystemEvent([](u64 timeout) { std::abort(); return 0; }, a); + return CreateSystemEvent([](u64 timeout) -> Result { std::abort(); }, a); } template diff --git a/include/stratosphere/ipc/ipc_serialization.hpp b/include/stratosphere/ipc/ipc_serialization.hpp index fc10d0d5..095e6b28 100644 --- a/include/stratosphere/ipc/ipc_serialization.hpp +++ b/include/stratosphere/ipc/ipc_serialization.hpp @@ -383,7 +383,7 @@ struct Validator { return ResultKernelConnectionClosed; } - return 0; + return ResultSuccess; } }; diff --git a/include/stratosphere/ipc/ipc_service_session.hpp b/include/stratosphere/ipc/ipc_service_session.hpp index a42cad4d..43e1dd72 100644 --- a/include/stratosphere/ipc/ipc_service_session.hpp +++ b/include/stratosphere/ipc/ipc_service_session.hpp @@ -170,7 +170,7 @@ class ServiceSession : public IWaitable ctx.cmd_type = (IpcCommandType)(*(u16 *)(armGetTls())); - ctx.rc = 0; + ctx.rc = ResultSuccess; /* Parse based on command type. */ switch (ctx.cmd_type) { @@ -222,7 +222,7 @@ class ServiceSession : public IWaitable ctx.rc = this->Reply(); if (ctx.rc == ResultKernelTimedOut) { - ctx.rc = 0x0; + ctx.rc = ResultSuccess; } this->CleanupResponse(&ctx); @@ -295,7 +295,7 @@ class ServiceSession : public IWaitable /* Return the object id. */ object_id.SetValue(reserved_id); - return 0; + return ResultSuccess; } Result CopyFromCurrentDomain(Out out_h, u32 id) { @@ -318,7 +318,7 @@ class ServiceSession : public IWaitable this->session->GetSessionManager()->AddSession(server_h, std::move(object->Clone())); out_h.SetValue(client_h); - return 0; + return ResultSuccess; } void CloneCurrentObject(Out out_h) { diff --git a/include/stratosphere/iwaitable.hpp b/include/stratosphere/iwaitable.hpp index d5721f84..bf7a7657 100644 --- a/include/stratosphere/iwaitable.hpp +++ b/include/stratosphere/iwaitable.hpp @@ -35,7 +35,6 @@ class IWaitable { virtual Result HandleDeferred() { /* By default, HandleDeferred panics, because object shouldn't be deferrable. */ std::abort(); - return 0; } bool IsSignaled() { diff --git a/include/stratosphere/mitm/mitm_server.hpp b/include/stratosphere/mitm/mitm_server.hpp index dbb597b7..eba8d8a3 100644 --- a/include/stratosphere/mitm/mitm_server.hpp +++ b/include/stratosphere/mitm/mitm_server.hpp @@ -96,7 +96,7 @@ class MitmServer : public IWaitable { smMitMExit(); this->GetSessionManager()->AddWaitable(new MitmSession(session_h, client_pid, forward_service, std::make_shared(forward_service, client_pid))); - return 0; + return ResultSuccess; } }; diff --git a/include/stratosphere/mitm/mitm_session.hpp b/include/stratosphere/mitm/mitm_session.hpp index 73a444d1..a7b2bd4c 100644 --- a/include/stratosphere/mitm/mitm_session.hpp +++ b/include/stratosphere/mitm/mitm_session.hpp @@ -241,7 +241,7 @@ class MitmSession final : public ServiceSession { /* Return the object id. */ object_id.SetValue(expected_id); - return 0; + return ResultSuccess; } Result CopyFromCurrentDomain(Out out_h, u32 id) { @@ -293,7 +293,7 @@ class MitmSession final : public ServiceSession { } else { this->session->GetSessionManager()->AddSession(server_h, std::move(object->Clone())); } - return 0; + return ResultSuccess; } void CloneCurrentObject(Out out_h) { diff --git a/include/stratosphere/servers.hpp b/include/stratosphere/servers.hpp index 7771157f..b5afe852 100644 --- a/include/stratosphere/servers.hpp +++ b/include/stratosphere/servers.hpp @@ -54,7 +54,7 @@ class IServer : public IWaitable { } this->GetSessionManager()->AddSession(session_h, std::move(ServiceObjectHolder(std::move(std::make_shared())))); - return 0; + return ResultSuccess; } }; diff --git a/include/stratosphere/waitable_manager.hpp b/include/stratosphere/waitable_manager.hpp index 158cb294..927e71e0 100644 --- a/include/stratosphere/waitable_manager.hpp +++ b/include/stratosphere/waitable_manager.hpp @@ -356,7 +356,7 @@ class WaitableManager : public SessionManagerBase { if (this->domain_objects[i].owner == nullptr) { this->domain_objects[i].owner = domain; *out_object_id = i+1; - return 0; + return ResultSuccess; } } return ResultServiceFrameworkOutOfDomainEntries; @@ -369,7 +369,7 @@ class WaitableManager : public SessionManagerBase { } if (this->domain_objects[object_id-1].owner == nullptr) { this->domain_objects[object_id-1].owner = domain; - return 0; + return ResultSuccess; } return ResultServiceFrameworkOutOfDomainEntries; } @@ -403,7 +403,7 @@ class WaitableManager : public SessionManagerBase { if (this->domain_objects[object_id-1].owner == domain) { this->domain_objects[object_id-1].obj_holder.Reset(); this->domain_objects[object_id-1].owner = nullptr; - return 0x0; + return ResultSuccess; } return ResultHipcDomainObjectNotFound; } @@ -416,7 +416,7 @@ class WaitableManager : public SessionManagerBase { if (this->domain_objects[object_id-1].owner != nullptr) { this->domain_objects[object_id-1].obj_holder.Reset(); this->domain_objects[object_id-1].owner = nullptr; - return 0x0; + return ResultSuccess; } return ResultHipcDomainObjectNotFound; } diff --git a/source/mitm_query_service.cpp b/source/mitm_query_service.cpp index f6b1dd86..74817d5a 100644 --- a/source/mitm_query_service.cpp +++ b/source/mitm_query_service.cpp @@ -28,7 +28,7 @@ Result MitmQueryUtils::GetAssociatedTidForPid(u64 pid, u64 *tid) { for (unsigned int i = 0; i < g_known_pids.size(); i++) { if (g_known_pids[i] == pid) { *tid = g_known_tids[i]; - rc = 0x0; + rc = ResultSuccess; break; } }