oledb32/tests: Simplify some ok() checks (PVS-Studio).

Michael Stefaniuc mstefani at redhat.de
Thu Jan 8 04:07:55 CST 2015


---
 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);
 
 
         }
-- 
1.9.3



More information about the wine-patches mailing list