You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2021/11/05 19:49:36 UTC
[commons-daemon] branch master updated: Slightly better local
variable name.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-daemon.git
The following commit(s) were added to refs/heads/master by this push:
new 48ab942 Slightly better local variable name.
48ab942 is described below
commit 48ab942212c8d1912fcb06360dad6f824d8a3b1e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Nov 5 15:49:33 2021 -0400
Slightly better local variable name.
---
src/native/windows/src/log.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/native/windows/src/log.c b/src/native/windows/src/log.c
index f5e6d2d..ce1a356 100644
--- a/src/native/windows/src/log.c
+++ b/src/native/windows/src/log.c
@@ -446,7 +446,7 @@ apxDisplayError(
CHAR sysbuf[SIZ_HUGLEN];
int len = 0, nRet;
LPCSTR f = szFile;
- DWORD err = GetLastError(); /* save the last Error code */
+ DWORD dwMessageId = GetLastError(); /* save the last Error code */
if (f) {
f = (szFile + lstrlenA(szFile) - 1);
while(f != szFile && '\\' != *f && '/' != *f)
@@ -457,11 +457,11 @@ apxDisplayError(
else
f = "";
sysbuf[0] = '\0';
- if (err != ERROR_SUCCESS) {
+ if (dwMessageId != ERROR_SUCCESS) {
len = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
- err,
+ dwMessageId,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
sysbuf,
SIZ_DESLEN,
@@ -504,6 +504,6 @@ apxDisplayError(
}
}
/* Restore the last Error code */
- SetLastError(err);
+ SetLastError(dwMessageId);
return len;
}