summaryrefslogtreecommitdiff
path: root/onlineupdate
diff options
context:
space:
mode:
authorMuhammet Kara <muhammet.kara@collabora.com>2020-02-10 01:46:45 +0300
committerMuhammet Kara <muhammet.kara@collabora.com>2020-02-10 01:03:22 +0100
commit057307de1239efd8b526d674f6ebd4a81d7417df (patch)
tree35f73f540accc0ae767ef84643ab1df5e3a79999 /onlineupdate
parenta6ad91d3e9c956338cf9daed9a3fad64bfcbdcb5 (diff)
Fix accidental variable shadowing
Was causing the if-check after the loop evaluating to false always, thus never running inside the if-block. It was probably never catched because the initial value of the outer variable applicationRunningError is always WAIT_TIMEOUT. This was also causing error codes other than ERROR_SUCCESS and WAIT_TIMEOUT never being returned from this method. Change-Id: I068f96cd4d5afd63fe7017062e5ad6af171dcca0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88353 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
Diffstat (limited to 'onlineupdate')
-rw-r--r--onlineupdate/source/update/common/updatehelper.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/onlineupdate/source/update/common/updatehelper.cxx b/onlineupdate/source/update/common/updatehelper.cxx
index 1363fa040eb9..09f857b1a9e9 100644
--- a/onlineupdate/source/update/common/updatehelper.cxx
+++ b/onlineupdate/source/update/common/updatehelper.cxx
@@ -686,7 +686,7 @@ WaitForProcessExit(LPCWSTR filename, DWORD maxSeconds)
DWORD applicationRunningError = WAIT_TIMEOUT;
for (DWORD i = 0; i < maxSeconds; i++)
{
- DWORD applicationRunningError = IsProcessRunning(filename);
+ applicationRunningError = IsProcessRunning(filename);
if (ERROR_NOT_FOUND == applicationRunningError)
{
return ERROR_SUCCESS;