From 5a6ed4e8eadf3af3d141b246f124d67b62a1357c Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Tue, 21 Feb 2023 12:13:36 -0500 Subject: add upstream 12.1 --- zen/sys_error.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'zen/sys_error.cpp') 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(::g_strerror(ec)); //... vs strerror(): "marginally improves thread safety, and marginally improves consistency" + std::wstring errorMsg = utfTo(::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; } -- cgit