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>
This commit is contained in:
Nikolay Sivov 2015-10-20 15:57:36 +03:00 committed by Alexandre Julliard
parent b5699c80dd
commit 9cede2f0a6
1 changed files with 5 additions and 3 deletions

View File

@ -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).