Commit 78cfd137 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

windowscodecs: Use FAILED instead of !SUCCEEDED.

parent f3fc0050
...@@ -952,7 +952,7 @@ HRESULT CreateComponentEnumerator(DWORD componentTypes, DWORD options, IEnumUnkn ...@@ -952,7 +952,7 @@ HRESULT CreateComponentEnumerator(DWORD componentTypes, DWORD options, IEnumUnkn
list_add_tail(&This->objects, &item->entry); list_add_tail(&This->objects, &item->entry);
} }
if (!SUCCEEDED(hr)) if (FAILED(hr))
{ {
HeapFree(GetProcessHeap(), 0, item); HeapFree(GetProcessHeap(), 0, item);
hr = S_OK; hr = S_OK;
......
...@@ -70,7 +70,7 @@ static void test_decode_24bpp(void) ...@@ -70,7 +70,7 @@ static void test_decode_24bpp(void)
hr = CoCreateInstance(&CLSID_WICBmpDecoder, NULL, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_WICBmpDecoder, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICBitmapDecoder, (void**)&decoder); &IID_IWICBitmapDecoder, (void**)&decoder);
ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%x\n", hr); ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%x\n", hr);
if (!SUCCEEDED(hr)) return; if (FAILED(hr)) return;
hbmpdata = GlobalAlloc(GMEM_MOVEABLE, sizeof(testbmp_24bpp)); hbmpdata = GlobalAlloc(GMEM_MOVEABLE, sizeof(testbmp_24bpp));
ok(hbmpdata != 0, "GlobalAlloc failed\n"); ok(hbmpdata != 0, "GlobalAlloc failed\n");
...@@ -277,7 +277,7 @@ static void test_decode_1bpp(void) ...@@ -277,7 +277,7 @@ static void test_decode_1bpp(void)
hr = CoCreateInstance(&CLSID_WICBmpDecoder, NULL, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_WICBmpDecoder, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICBitmapDecoder, (void**)&decoder); &IID_IWICBitmapDecoder, (void**)&decoder);
ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%x\n", hr); ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%x\n", hr);
if (!SUCCEEDED(hr)) return; if (FAILED(hr)) return;
hbmpdata = GlobalAlloc(GMEM_MOVEABLE, sizeof(testbmp_1bpp)); hbmpdata = GlobalAlloc(GMEM_MOVEABLE, sizeof(testbmp_1bpp));
ok(hbmpdata != 0, "GlobalAlloc failed\n"); ok(hbmpdata != 0, "GlobalAlloc failed\n");
...@@ -435,7 +435,7 @@ static void test_decode_4bpp(void) ...@@ -435,7 +435,7 @@ static void test_decode_4bpp(void)
hr = CoCreateInstance(&CLSID_WICBmpDecoder, NULL, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_WICBmpDecoder, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICBitmapDecoder, (void**)&decoder); &IID_IWICBitmapDecoder, (void**)&decoder);
ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%x\n", hr); ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%x\n", hr);
if (!SUCCEEDED(hr)) return; if (FAILED(hr)) return;
hbmpdata = GlobalAlloc(GMEM_MOVEABLE, sizeof(testbmp_4bpp)); hbmpdata = GlobalAlloc(GMEM_MOVEABLE, sizeof(testbmp_4bpp));
ok(hbmpdata != 0, "GlobalAlloc failed\n"); ok(hbmpdata != 0, "GlobalAlloc failed\n");
...@@ -614,7 +614,7 @@ static void test_decode_rle8(void) ...@@ -614,7 +614,7 @@ static void test_decode_rle8(void)
hr = CoCreateInstance(&CLSID_WICBmpDecoder, NULL, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_WICBmpDecoder, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICBitmapDecoder, (void**)&decoder); &IID_IWICBitmapDecoder, (void**)&decoder);
ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%x\n", hr); ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%x\n", hr);
if (!SUCCEEDED(hr)) return; if (FAILED(hr)) return;
hbmpdata = GlobalAlloc(GMEM_MOVEABLE, sizeof(testbmp_rle8)); hbmpdata = GlobalAlloc(GMEM_MOVEABLE, sizeof(testbmp_rle8));
ok(hbmpdata != 0, "GlobalAlloc failed\n"); ok(hbmpdata != 0, "GlobalAlloc failed\n");
...@@ -780,7 +780,7 @@ static void test_decode_rle4(void) ...@@ -780,7 +780,7 @@ static void test_decode_rle4(void)
hr = CoCreateInstance(&CLSID_WICBmpDecoder, NULL, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_WICBmpDecoder, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICBitmapDecoder, (void**)&decoder); &IID_IWICBitmapDecoder, (void**)&decoder);
ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%x\n", hr); ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%x\n", hr);
if (!SUCCEEDED(hr)) return; if (FAILED(hr)) return;
hbmpdata = GlobalAlloc(GMEM_MOVEABLE, sizeof(testbmp_rle4)); hbmpdata = GlobalAlloc(GMEM_MOVEABLE, sizeof(testbmp_rle4));
ok(hbmpdata != 0, "GlobalAlloc failed\n"); ok(hbmpdata != 0, "GlobalAlloc failed\n");
...@@ -999,7 +999,7 @@ static void test_createfromstream(void) ...@@ -999,7 +999,7 @@ static void test_createfromstream(void)
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void**)&factory); &IID_IWICImagingFactory, (void**)&factory);
ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%x\n", hr); ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%x\n", hr);
if (!SUCCEEDED(hr)) return; if (FAILED(hr)) return;
hbmpdata = GlobalAlloc(GMEM_MOVEABLE, sizeof(testbmp_1bpp)); hbmpdata = GlobalAlloc(GMEM_MOVEABLE, sizeof(testbmp_1bpp));
ok(hbmpdata != 0, "GlobalAlloc failed\n"); ok(hbmpdata != 0, "GlobalAlloc failed\n");
......
...@@ -39,7 +39,7 @@ static void test_custom_palette(void) ...@@ -39,7 +39,7 @@ static void test_custom_palette(void)
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void**)&factory); &IID_IWICImagingFactory, (void**)&factory);
ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%x\n", hr); ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%x\n", hr);
if (!SUCCEEDED(hr)) return; if (FAILED(hr)) return;
hr = IWICImagingFactory_CreatePalette(factory, &palette); hr = IWICImagingFactory_CreatePalette(factory, &palette);
ok(SUCCEEDED(hr), "CreatePalette failed, hr=%x\n", hr); ok(SUCCEEDED(hr), "CreatePalette failed, hr=%x\n", hr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment