Michael Stefaniuc : oledb32/tests: Simplify some ok() checks (PVS-Studio).
Module: wine Branch: master Commit: 6d3c83b86936368e82ad5d2607125275f7f1d675 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6d3c83b86936368e82ad5d2607... Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Jan 8 11:07:55 2015 +0100 oledb32/tests: Simplify some ok() checks (PVS-Studio). --- dlls/oledb32/tests/convert.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/dlls/oledb32/tests/convert.c b/dlls/oledb32/tests/convert.c index 3e78f24..b039e11 100644 --- a/dlls/oledb32/tests/convert.c +++ b/dlls/oledb32/tests/convert.c @@ -303,27 +303,21 @@ static void test_canconvert(void) /* src DBTYPE_VECTOR */ hr = IDataConvert_CanConvert(convert, simple_convert[src_idx].type | DBTYPE_VECTOR, simple_convert[dst_idx].type); - expect = FALSE; - ok((hr == S_OK && expect == TRUE) || - (hr == S_FALSE && expect == FALSE), - "%04x -> %04x: got %08x expect conversion to be %spossible\n", simple_convert[src_idx].type | DBTYPE_VECTOR, - simple_convert[dst_idx].type, hr, expect ? "" : "not "); + ok(hr == S_FALSE, + "%04x -> %04x: got %08x expect conversion to not be possible\n", simple_convert[src_idx].type | DBTYPE_VECTOR, + simple_convert[dst_idx].type, hr); /* dst DBTYPE_VECTOR */ hr = IDataConvert_CanConvert(convert, simple_convert[src_idx].type, simple_convert[dst_idx].type | DBTYPE_VECTOR); - expect = FALSE; - ok((hr == S_OK && expect == TRUE) || - (hr == S_FALSE && expect == FALSE), - "%04x -> %04x: got %08x expect conversion to be %spossible\n", simple_convert[src_idx].type, - simple_convert[dst_idx].type | DBTYPE_VECTOR, hr, expect ? "" : "not "); + ok(hr == S_FALSE, + "%04x -> %04x: got %08x expect conversion to not be possible\n", simple_convert[src_idx].type, + simple_convert[dst_idx].type | DBTYPE_VECTOR, hr); /* src & dst DBTYPE_VECTOR */ hr = IDataConvert_CanConvert(convert, simple_convert[src_idx].type | DBTYPE_VECTOR, simple_convert[dst_idx].type | DBTYPE_VECTOR); - expect = FALSE; - ok((hr == S_OK && expect == TRUE) || - (hr == S_FALSE && expect == FALSE), - "%04x -> %04x: got %08x expect conversion to be %spossible\n", simple_convert[src_idx].type | DBTYPE_VECTOR, - simple_convert[dst_idx].type | DBTYPE_VECTOR, hr, expect ? "" : "not "); + ok(hr == S_FALSE, + "%04x -> %04x: got %08x expect conversion to not be possible\n", simple_convert[src_idx].type | DBTYPE_VECTOR, + simple_convert[dst_idx].type | DBTYPE_VECTOR, hr); }
participants (1)
-
Alexandre Julliard