From 6410e8a7712315bea07fcbf9325b93f6fb268d76 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Wed, 14 Oct 2015 00:32:11 +0300 Subject: [PATCH] d3d8/tests: Use BOOL variable for ShowCursor return value (PVS-Studio). Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- dlls/d3d8/tests/device.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index ccc16c69c66..827f144758a 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -834,12 +834,12 @@ static void test_cursor(void) ok(SUCCEEDED(hr), "Failed to create cursor surface, hr %#x.\n", hr); /* Initially hidden */ - hr = IDirect3DDevice8_ShowCursor(device, TRUE); - ok(hr == FALSE, "IDirect3DDevice8_ShowCursor returned %#08x\n", hr); + ret = IDirect3DDevice8_ShowCursor(device, TRUE); + ok(!ret, "IDirect3DDevice8_ShowCursor returned %d\n", ret); /* Not enabled without a surface*/ - hr = IDirect3DDevice8_ShowCursor(device, TRUE); - ok(hr == FALSE, "IDirect3DDevice8_ShowCursor returned %#08x\n", hr); + ret = IDirect3DDevice8_ShowCursor(device, TRUE); + ok(!ret, "IDirect3DDevice8_ShowCursor returned %d\n", ret); /* Fails */ hr = IDirect3DDevice8_SetCursorProperties(device, 0, 0, NULL); @@ -857,12 +857,12 @@ static void test_cursor(void) ok(info.hCursor == cur, "The cursor handle is %p\n", info.hCursor); /* unchanged */ /* Still hidden */ - hr = IDirect3DDevice8_ShowCursor(device, TRUE); - ok(hr == FALSE, "IDirect3DDevice8_ShowCursor returned %#08x\n", hr); + ret = IDirect3DDevice8_ShowCursor(device, TRUE); + ok(!ret, "IDirect3DDevice8_ShowCursor returned %d\n", ret); /* Enabled now*/ - hr = IDirect3DDevice8_ShowCursor(device, TRUE); - ok(hr == TRUE, "IDirect3DDevice8_ShowCursor returned %#08x\n", hr); + ret = IDirect3DDevice8_ShowCursor(device, TRUE); + ok(ret, "IDirect3DDevice8_ShowCursor returned %d\n", ret); memset(&info, 0, sizeof(info)); info.cbSize = sizeof(info);