From 6f8718fc8fc055a86472082377caca8a70c057fa Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 26 Oct 2011 12:04:05 -0400 Subject: [PATCH] Don't bother checking S_OK here, it'll work in falling through. --- src/core/windows/SDL_windows.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/windows/SDL_windows.c b/src/core/windows/SDL_windows.c index 63a94f158..e00a399d8 100644 --- a/src/core/windows/SDL_windows.c +++ b/src/core/windows/SDL_windows.c @@ -42,10 +42,11 @@ WIN_SetError(const char *prefix) HRESULT WIN_CoInitialize(void) { + const HRESULT hr = CoInitialize(NULL); + /* S_FALSE means success, but someone else already initialized. */ /* You still need to call CoUninitialize in this case! */ - const HRESULT hr = CoInitialize(NULL); - if ((hr == S_OK) || (hr == S_FALSE)) { + if (hr == S_FALSE) { return S_OK; }