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

commit ed39a0201d436bf6134827d8a661cfe3ff194053
Author: Gary Gregory <[email protected]>
AuthorDate: Fri Nov 5 15:52:26 2021 -0400

    Slightly better local variable name.
---
 src/native/windows/src/log.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/native/windows/src/log.c b/src/native/windows/src/log.c
index ce1a356..821541f 100644
--- a/src/native/windows/src/log.c
+++ b/src/native/windows/src/log.c
@@ -302,11 +302,11 @@ apxLogWrite(
     LPCSTR  f = szFile;
     CHAR    sb[SIZ_PATHLEN];
     DWORD   wr;
-    DWORD   err;
+    DWORD   dwMessageId;
     BOOL    dolock = TRUE;
     apx_logfile_st *lf = (apx_logfile_st *)hFile;
 
-    err = GetLastError(); /* save the last Error code */
+    dwMessageId = GetLastError(); /* save the last Error code */
     if (IS_INVALID_HANDLE(lf))
         lf = _st_sys_loghandle;
     if (IS_INVALID_HANDLE(lf)) {
@@ -331,7 +331,7 @@ apxLogWrite(
         f = NULL;
     szBp = buffer;
     if (!szFormat) {
-        if (err == 0) {
+        if (dwMessageId == 0) {
             lstrcpyA(szBp, "Unknown error code");
             if (dwLevel == APXLOG_LEVEL_ERROR) {
                 szBp += 18;
@@ -342,7 +342,7 @@ apxLogWrite(
             FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM |
                            FORMAT_MESSAGE_IGNORE_INSERTS,
                            NULL,
-                           err,
+                           dwMessageId,
                            MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
                            szBp,
                            1000,
@@ -407,8 +407,8 @@ apxLogWrite(
     }
     APX_LOGLEAVE();
     /* Restore the last Error code */
-    SetLastError(err);
-    if (szFormat && err != 0 && dwLevel == APXLOG_LEVEL_ERROR) {
+    SetLastError(dwMessageId);
+    if (szFormat && dwMessageId != 0 && dwLevel == APXLOG_LEVEL_ERROR) {
         /* Print the System error description
          */
         apxLogWrite(hFile, dwLevel, bTimeStamp, szFile, dwLine, NULL);

Reply via email to