Don't bother checking S_OK here, it'll work in falling through.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 26 Oct 2011 12:04:05 -0400
changeset 60312cb2f3c56573
parent 6030 50560ca58f80
child 6032 aa31cad2451f
child 6065 fcd144b830ce
Don't bother checking S_OK here, it'll work in falling through.
src/core/windows/SDL_windows.c
     1.1 --- a/src/core/windows/SDL_windows.c	Mon Oct 24 23:18:53 2011 -0400
     1.2 +++ b/src/core/windows/SDL_windows.c	Wed Oct 26 12:04:05 2011 -0400
     1.3 @@ -42,10 +42,11 @@
     1.4  HRESULT
     1.5  WIN_CoInitialize(void)
     1.6  {
     1.7 +    const HRESULT hr = CoInitialize(NULL);
     1.8 +
     1.9      /* S_FALSE means success, but someone else already initialized. */
    1.10      /* You still need to call CoUninitialize in this case! */
    1.11 -    const HRESULT hr = CoInitialize(NULL);
    1.12 -    if ((hr == S_OK) || (hr == S_FALSE)) {
    1.13 +    if (hr == S_FALSE) {
    1.14          return S_OK;
    1.15      }
    1.16