summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-01 18:20:17 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-01 18:20:17 +0000
commit00d60fa690f04d37f7cc34688b8511cd3397fc3b (patch)
treec2eab34e6bed1a6786db15c78db4d1f66859ade3 /chrome_frame
parent39e537e316d35c2dd5181deb445f0420d4dc23b1 (diff)
downloadchromium_src-00d60fa690f04d37f7cc34688b8511cd3397fc3b.zip
chromium_src-00d60fa690f04d37f7cc34688b8511cd3397fc3b.tar.gz
chromium_src-00d60fa690f04d37f7cc34688b8511cd3397fc3b.tar.bz2
Miscellaneous tiny cleanups done while converting files to use ScopedCOMInitializer, pulled out separately to make review easier.
BUG=none TEST=none Review URL: https://codereview.chromium.org/10991052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159526 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/update_launcher.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/chrome_frame/update_launcher.cc b/chrome_frame/update_launcher.cc
index 789e8db..b2d23123 100644
--- a/chrome_frame/update_launcher.cc
+++ b/chrome_frame/update_launcher.cc
@@ -21,13 +21,9 @@ const wchar_t kUpdateCommandFlag[] = L"--update-cmd";
// exit code, or kLaunchFailureExitCode if an error occurs in the waiting.
DWORD WaitForProcessExitCode(HANDLE handle) {
DWORD exit_code = 0;
-
- DWORD wait_result = ::WaitForSingleObject(handle, INFINITE);
-
- if (wait_result == WAIT_OBJECT_0 && ::GetExitCodeProcess(handle, &exit_code))
- return exit_code;
-
- return kLaunchFailureExitCode;
+ return ((::WaitForSingleObject(handle, INFINITE) == WAIT_OBJECT_0) &&
+ ::GetExitCodeProcess(handle, &exit_code)) ?
+ exit_code : kLaunchFailureExitCode;
}
} // namespace