From: Henri Verbeet hverbeet@codeweavers.com
--- dlls/d3dx11_43/tests/d3dx11.c | 48 ++++++----------------------------- 1 file changed, 8 insertions(+), 40 deletions(-)
diff --git a/dlls/d3dx11_43/tests/d3dx11.c b/dlls/d3dx11_43/tests/d3dx11.c index 64ee050ec5d..16c0f0bc03e 100644 --- a/dlls/d3dx11_43/tests/d3dx11.c +++ b/dlls/d3dx11_43/tests/d3dx11.c @@ -578,16 +578,8 @@ static void test_D3DX11CompileFromFile(void) ok(hr == S_OK && hr == result, "Got unexpected hr %#lx, result %#lx.\n", hr, result); ok(!!blob, "Got unexpected blob.\n"); ok(!errors, "Got unexpected errors.\n"); - if (errors) - { - ID3D10Blob_Release(errors); - errors = NULL; - } - if (blob) - { - ID3D10Blob_Release(blob); - blob = NULL; - } + ID3D10Blob_Release(blob); + blob = NULL;
/* Windows always seems to resolve includes from the initial file location * instead of using the immediate parent, as it would be the case for @@ -596,16 +588,8 @@ static void test_D3DX11CompileFromFile(void) ok(hr == S_OK && hr == result, "Got unexpected hr %#lx, result %#lx.\n", hr, result); ok(!!blob, "Got unexpected blob.\n"); ok(!errors, "Got unexpected errors.\n"); - if (errors) - { - ID3D10Blob_Release(errors); - errors = NULL; - } - if (blob) - { - ID3D10Blob_Release(blob); - blob = NULL; - } + ID3D10Blob_Release(blob); + blob = NULL;
len = WideCharToMultiByte(CP_ACP, 0, filename, -1, NULL, 0, NULL, NULL); WideCharToMultiByte(CP_ACP, 0, filename, -1, filename_a, len, NULL, NULL); @@ -613,16 +597,8 @@ static void test_D3DX11CompileFromFile(void) ok(hr == S_OK && hr == result, "Got unexpected hr %#lx, result %#lx.\n", hr, result); ok(!!blob, "Got unexpected blob.\n"); ok(!errors, "Got unexpected errors.\n"); - if (errors) - { - ID3D10Blob_Release(errors); - errors = NULL; - } - if (blob) - { - ID3D10Blob_Release(blob); - blob = NULL; - } + ID3D10Blob_Release(blob); + blob = NULL;
GetCurrentDirectoryW(MAX_PATH, directory); SetCurrentDirectoryW(temp_dir); @@ -631,16 +607,8 @@ static void test_D3DX11CompileFromFile(void) ok(hr == S_OK && hr == result, "Got unexpected hr %#lx, result %#lx.\n", hr, result); ok(!!blob, "Got unexpected blob.\n"); ok(!errors, "Got unexpected errors.\n"); - if (errors) - { - ID3D10Blob_Release(errors); - errors = NULL; - } - if (blob) - { - ID3D10Blob_Release(blob); - blob = NULL; - } + ID3D10Blob_Release(blob); + blob = NULL;
SetCurrentDirectoryW(directory);