You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ma...@apache.org on 2020/08/24 18:08:26 UTC

[commons-daemon] 01/02: Fix compilation error for release builds and remove trailing space

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-daemon.git

commit 7c1470e55b64e5690d935ed33105211b00f4c30d
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Aug 24 17:21:47 2020 +0100

    Fix compilation error for release builds and remove trailing space
---
 src/native/windows/src/javajni.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/native/windows/src/javajni.c b/src/native/windows/src/javajni.c
index c67831d..4da3e5e 100644
--- a/src/native/windows/src/javajni.c
+++ b/src/native/windows/src/javajni.c
@@ -287,13 +287,13 @@ static BOOL __apxLoadJvmDll(APXHANDLE hPool, LPCWSTR szJvmDllPath, LPCWSTR szJav
     _st_sys_jvmDllHandle = LoadLibraryExW(dllJvmPath, NULL, 0);
     if (IS_INVALID_HANDLE(_st_sys_jvmDllHandle) &&
         GetFileAttributesW(dllJvmPath) != INVALID_FILE_ATTRIBUTES) {
+        WCHAR  crtBinPath[SIZ_PATHLEN];
+
         /* There is a file but cannot be loaded.
          * Try to load the MSVCRTxx.dll before JVM.dll
          */
         apxLogWrite(APXLOG_MARK_ERROR "Found '%S' but couldn't load it.", dllJvmPath);
 
-        WCHAR  crtBinPath[SIZ_PATHLEN];
-
         lstrlcpyW(jreBinPath, SIZ_PATHLEN, dllJvmPath);
         if(l == 2) {
             lstrlcpyW(crtBinPath, SIZ_PATHLEN, jreBinPath);
@@ -1150,10 +1150,10 @@ apxJavaWait(APXHANDLE hJava, DWORD dwMilliseconds, BOOL bKill)
 
     if (!lpJava->dwWorkerStatus && lpJava->hWorkerThread)
         return WAIT_OBJECT_0;
-    apxLogWrite(APXLOG_MARK_DEBUG "WaitForSingleObject 0x%p %d milliseconds (INFINITE=%d)...", 
+    apxLogWrite(APXLOG_MARK_DEBUG "WaitForSingleObject 0x%p %d milliseconds (INFINITE=%d)...",
         lpJava->hWorkerThread, dwMilliseconds, INFINITE);
     rv = WaitForSingleObject(lpJava->hWorkerThread, dwMilliseconds);
-    apxLogWrite(APXLOG_MARK_DEBUG "WaitForSingleObject 0x%p = %d (WAIT_TIMEOUT=%d)", 
+    apxLogWrite(APXLOG_MARK_DEBUG "WaitForSingleObject 0x%p = %d (WAIT_TIMEOUT=%d)",
         lpJava->hWorkerThread, rv, WAIT_TIMEOUT);
     if (rv == WAIT_TIMEOUT && bKill) {
         __apxJavaJniCallback(hJava, WM_CLOSE, 0, 0);