summaryrefslogtreecommitdiff
path: root/zen/sys_error.cpp
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2023-02-21 12:13:36 -0500
committerB. Stack <bgstack15@gmail.com>2023-02-21 12:13:36 -0500
commit5a6ed4e8eadf3af3d141b246f124d67b62a1357c (patch)
tree4e49ae80efbe181c46110867fe7cf703efd3fcf5 /zen/sys_error.cpp
parentargon2 copyright notice updated (diff)
downloadFreeFileSync-12.1.tar.gz
FreeFileSync-12.1.tar.bz2
FreeFileSync-12.1.zip
add upstream 12.112.1
Diffstat (limited to 'zen/sys_error.cpp')
-rw-r--r--zen/sys_error.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/zen/sys_error.cpp b/zen/sys_error.cpp
index fa7352f0..90d9ee2e 100644
--- a/zen/sys_error.cpp
+++ b/zen/sys_error.cpp
@@ -248,13 +248,13 @@ std::wstring zen::formatGlibError(const std::string& functionName, GError* error
std::wstring zen::getSystemErrorDescription(ErrorCode ec) //return empty string on error
{
- const ErrorCode currentError = getLastError(); //not necessarily == ec
- ZEN_ON_SCOPE_EXIT(errno = currentError);
+ const ErrorCode ecCurrent = getLastError(); //not necessarily == ec
+ ZEN_ON_SCOPE_EXIT(errno = ecCurrent);
- std::wstring errorMsg;
- errorMsg = utfTo<std::wstring>(::g_strerror(ec)); //... vs strerror(): "marginally improves thread safety, and marginally improves consistency"
+ std::wstring errorMsg = utfTo<std::wstring>(::g_strerror(ec)); //... vs strerror(): "marginally improves thread safety, and marginally improves consistency"
- return trimCpy(errorMsg); //Windows messages seem to end with a space...
+ trim(errorMsg); //Windows messages seem to end with a space...
+ return errorMsg;
}
bgstack15