mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 19:58:53 +00:00
do not assign in conditional statements
This commit is contained in:
parent
50f34f8b05
commit
9357cee2ef
6 changed files with 30 additions and 26 deletions
|
@ -631,9 +631,9 @@ void CopyDir(const std::string& source_path, const std::string& dest_path)
|
|||
// Returns the current directory
|
||||
std::string GetCurrentDir()
|
||||
{
|
||||
char* dir;
|
||||
// Get the current working directory (getcwd uses malloc)
|
||||
if (!(dir = __getcwd(nullptr, 0)))
|
||||
char* dir = __getcwd(nullptr, 0);
|
||||
if (!dir)
|
||||
{
|
||||
ERROR_LOG(COMMON, "GetCurrentDirectory failed: %s", GetLastErrorMsg().c_str());
|
||||
return nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue