Module: wine Branch: master Commit: 9cede2f0a6e1d22d4cb5e4f9e9f0ea0d359a8fda URL: http://source.winehq.org/git/wine.git/?a=commit;h=9cede2f0a6e1d22d4cb5e4f9e9...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Tue Oct 20 15:57:36 2015 +0300
usp10/tests: Use BOOL variable for BOOL retval (PVS-Studio).
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/usp10/tests/usp10.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index bfd84d4..7e33ecc 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -2267,15 +2267,17 @@ static void test_ScriptTextOut2(HDC hdc) ok (hr == S_OK, "ScriptShape should return S_OK not (%08x)\n", hr); ok (psc != NULL, "psc should not be null and have SCRIPT_CACHE buffer address\n"); ok (pcGlyphs == cChars, "Chars in (%d) should equal Glyphs out (%d)\n", cChars, pcGlyphs); - if (hr ==0) { + if (hr == S_OK) { + BOOL ret; + /* Note hdc is needed as glyph info is not yet in psc */ hr = ScriptPlace(hdc2, &psc, pwOutGlyphs1, pcGlyphs, psva, &pItem[0].a, piAdvance, pGoffset, pABC); ok (hr == S_OK, "Should return S_OK not (%08x)\n", hr);
/* key part!!! cached dc is being deleted */ - hr = DeleteDC(hdc2); - ok(hr == 1, "DeleteDC should return 1 not %08x\n", hr); + ret = DeleteDC(hdc2); + ok(ret, "DeleteDC should return 1 not %d\n", ret);
/* At this point the cached hdc (hdc2) has been destroyed, * however, we are passing in a *real* hdc (the original hdc).