diff options
| author | Shawn Hoffman <godisgovernment@gmail.com> | 2017-06-07 04:42:41 -0700 |
|---|---|---|
| committer | Shawn Hoffman <godisgovernment@gmail.com> | 2017-06-07 20:09:44 -0700 |
| commit | 9357cee2ef96fbe345a82ac2f6af7c715d1e6027 (patch) | |
| tree | badd7f8703424f269d1242b3964561ef0485c005 /Source/Core/Common/FileUtil.cpp | |
| parent | 50f34f8b05ea64c42f465d6bd384208e886ba88f (diff) | |
do not assign in conditional statements
Diffstat (limited to 'Source/Core/Common/FileUtil.cpp')
| -rw-r--r-- | Source/Core/Common/FileUtil.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp index 2ae063673f..203ddbac4b 100644 --- a/Source/Core/Common/FileUtil.cpp +++ b/Source/Core/Common/FileUtil.cpp @@ -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; |
