Michael Stefaniuc : ieframe/tests: Merge adjacent identical if's ( PVS-Studio).

Alexandre Julliard julliard at wine.codeweavers.com
Fri Mar 6 06:27:28 CST 2015


Module: wine
Branch: master
Commit: 8a755f37d8949375997c21cd9d7789de412f1536
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8a755f37d8949375997c21cd9d7789de412f1536

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Fri Mar  6 10:21:07 2015 +0100

ieframe/tests: Merge adjacent identical if's (PVS-Studio).

---

 dlls/ieframe/tests/webbrowser.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/dlls/ieframe/tests/webbrowser.c b/dlls/ieframe/tests/webbrowser.c
index d86faf8..3dae2b6 100644
--- a/dlls/ieframe/tests/webbrowser.c
+++ b/dlls/ieframe/tests/webbrowser.c
@@ -2684,9 +2684,11 @@ static void test_Navigate2(IWebBrowser2 *webbrowser, const char *nav_url)
             SET_EXPECT(GetOptionKeyPath);
             SET_EXPECT(GetOverridesKeyPath);
         }
-        if (use_container_olecmd) SET_EXPECT(QueryStatus_SETPROGRESSTEXT);
-        if (use_container_olecmd) SET_EXPECT(Exec_SETPROGRESSMAX);
-        if (use_container_olecmd) SET_EXPECT(Exec_SETPROGRESSPOS);
+        if (use_container_olecmd) {
+            SET_EXPECT(QueryStatus_SETPROGRESSTEXT);
+            SET_EXPECT(Exec_SETPROGRESSMAX);
+            SET_EXPECT(Exec_SETPROGRESSPOS);
+        }
         SET_EXPECT(Invoke_SETSECURELOCKICON);
         SET_EXPECT(Invoke_FILEDOWNLOAD);
         if (use_container_olecmd) SET_EXPECT(Exec_SETDOWNLOADSTATE_0);
@@ -2725,9 +2727,11 @@ static void test_Navigate2(IWebBrowser2 *webbrowser, const char *nav_url)
             CLEAR_CALLED(GetOptionKeyPath);
             CHECK_CALLED(GetOverridesKeyPath);
         }
-        if (use_container_olecmd) todo_wine CHECK_CALLED(QueryStatus_SETPROGRESSTEXT);
-        if (use_container_olecmd) todo_wine CHECK_CALLED(Exec_SETPROGRESSMAX);
-        if (use_container_olecmd) todo_wine CHECK_CALLED(Exec_SETPROGRESSPOS);
+        if (use_container_olecmd) {
+            todo_wine CHECK_CALLED(QueryStatus_SETPROGRESSTEXT);
+            todo_wine CHECK_CALLED(Exec_SETPROGRESSMAX);
+            todo_wine CHECK_CALLED(Exec_SETPROGRESSPOS);
+        }
         todo_wine CHECK_CALLED(Invoke_SETSECURELOCKICON);
         todo_wine CHECK_CALLED(Invoke_FILEDOWNLOAD);
 




More information about the wine-cvs mailing list