mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 08:51:28 +12:00
Code review (#3114)
* Fix always-true conditions in sceNp module * gl_render_targets: useless check on unsigned variable, possible bug * fixed UB in crypto utility functions * copy-paste error in vk::init_default_resources * pass strings by const ref * Dont copy vectors. Make sure copies are not needed because functions are used in a multi-threaded context.
This commit is contained in:
parent
77f58326af
commit
607d2486ea
16 changed files with 32 additions and 32 deletions
|
@ -972,7 +972,7 @@ s32 sceNpManagerGetOnlineId(vm::ptr<SceNpOnlineId> onlineId)
|
|||
return SCE_NP_ERROR_OFFLINE;
|
||||
}
|
||||
|
||||
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_LOGGING_IN || g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
|
||||
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_LOGGING_IN && g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
|
||||
{
|
||||
return SCE_NP_ERROR_INVALID_STATE;
|
||||
}
|
||||
|
@ -994,7 +994,7 @@ s32 sceNpManagerGetNpId(ppu_thread& ppu, vm::ptr<SceNpId> npId)
|
|||
return SCE_NP_ERROR_OFFLINE;
|
||||
}
|
||||
|
||||
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_LOGGING_IN || g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
|
||||
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_LOGGING_IN && g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
|
||||
{
|
||||
return SCE_NP_ERROR_INVALID_STATE;
|
||||
}
|
||||
|
@ -1082,7 +1082,7 @@ s32 sceNpManagerGetAccountRegion(vm::ptr<SceNpCountryCode> countryCode, vm::ptr<
|
|||
return SCE_NP_ERROR_OFFLINE;
|
||||
}
|
||||
|
||||
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_LOGGING_IN || g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
|
||||
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_LOGGING_IN && g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
|
||||
{
|
||||
return SCE_NP_ERROR_INVALID_STATE;
|
||||
}
|
||||
|
@ -1104,7 +1104,7 @@ s32 sceNpManagerGetAccountAge(vm::ptr<s32> age)
|
|||
return SCE_NP_ERROR_OFFLINE;
|
||||
}
|
||||
|
||||
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_LOGGING_IN || g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
|
||||
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_LOGGING_IN && g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
|
||||
{
|
||||
return SCE_NP_ERROR_INVALID_STATE;
|
||||
}
|
||||
|
@ -1126,7 +1126,7 @@ s32 sceNpManagerGetContentRatingFlag(vm::ptr<s32> isRestricted, vm::ptr<s32> age
|
|||
return SCE_NP_ERROR_OFFLINE;
|
||||
}
|
||||
|
||||
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_LOGGING_IN || g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
|
||||
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_LOGGING_IN && g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
|
||||
{
|
||||
return SCE_NP_ERROR_INVALID_STATE;
|
||||
}
|
||||
|
@ -1152,7 +1152,7 @@ s32 sceNpManagerGetChatRestrictionFlag(vm::ptr<s32> isRestricted)
|
|||
return SCE_NP_ERROR_OFFLINE;
|
||||
}
|
||||
|
||||
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_LOGGING_IN || g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
|
||||
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_LOGGING_IN && g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
|
||||
{
|
||||
return SCE_NP_ERROR_INVALID_STATE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue