Nikolay Sivov : d3d9/tests: Use BOOL variable for ShowCursor return value (PVS-Studio).
Module: wine Branch: master Commit: 6c2bda6e339fde134c2ee3e191f4e38b560f50de URL: http://source.winehq.org/git/wine.git/?a=commit;h=6c2bda6e339fde134c2ee3e191... Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Oct 14 00:32:11 2015 +0300 d3d9/tests: Use BOOL variable for ShowCursor return value (PVS-Studio). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d9/tests/device.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 3bf0ff2..326e789 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -1638,12 +1638,12 @@ static void test_cursor(void) ok(SUCCEEDED(hr), "Failed to create cursor surface, hr %#x.\n", hr); /* Initially hidden */ - hr = IDirect3DDevice9_ShowCursor(device, TRUE); - ok(hr == FALSE, "IDirect3DDevice9_ShowCursor returned %08x\n", hr); + ret = IDirect3DDevice9_ShowCursor(device, TRUE); + ok(!ret, "IDirect3DDevice9_ShowCursor returned %d\n", ret); /* Not enabled without a surface*/ - hr = IDirect3DDevice9_ShowCursor(device, TRUE); - ok(hr == FALSE, "IDirect3DDevice9_ShowCursor returned %08x\n", hr); + ret = IDirect3DDevice9_ShowCursor(device, TRUE); + ok(!ret, "IDirect3DDevice9_ShowCursor returned %d\n", ret); /* Fails */ hr = IDirect3DDevice9_SetCursorProperties(device, 0, 0, NULL); @@ -1661,12 +1661,12 @@ static void test_cursor(void) ok(info.hCursor == cur, "The cursor handle is %p\n", info.hCursor); /* unchanged */ /* Still hidden */ - hr = IDirect3DDevice9_ShowCursor(device, TRUE); - ok(hr == FALSE, "IDirect3DDevice9_ShowCursor returned %08x\n", hr); + ret = IDirect3DDevice9_ShowCursor(device, TRUE); + ok(!ret, "IDirect3DDevice9_ShowCursor returned %d\n", ret); /* Enabled now*/ - hr = IDirect3DDevice9_ShowCursor(device, TRUE); - ok(hr == TRUE, "IDirect3DDevice9_ShowCursor returned %08x\n", hr); + ret = IDirect3DDevice9_ShowCursor(device, TRUE); + ok(ret, "IDirect3DDevice9_ShowCursor returned %d\n", ret); memset(&info, 0, sizeof(info)); info.cbSize = sizeof(info);
participants (1)
-
Alexandre Julliard