Huw Davies : shell32/tests: Return early if the shell folder creation fails in order to avoid a compiler warning.

Alexandre Julliard julliard at winehq.org
Fri Mar 17 15:19:46 CDT 2017


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

Author: Huw Davies <huw at codeweavers.com>
Date:   Fri Mar 17 10:47:59 2017 +0000

shell32/tests: Return early if the shell folder creation fails in order to avoid a compiler warning.

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/shell32/tests/shlfolder.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c
index 759cce6..07309ab 100644
--- a/dlls/shell32/tests/shlfolder.c
+++ b/dlls/shell32/tests/shlfolder.c
@@ -3800,10 +3800,10 @@ static void test_ShellItemArrayEnumItems(void)
         hr = IShellFolder_BindToObject(pdesktopsf, pidl_testdir, NULL, (REFIID)&IID_IShellFolder,
                                        (void**)&psf);
         ok(hr == S_OK, "Got 0x%08x\n", hr);
-        if(SUCCEEDED(hr))
-            pILFree(pidl_testdir);
+        pILFree(pidl_testdir);
     }
     IShellFolder_Release(pdesktopsf);
+    if (FAILED(hr)) return;
 
     hr = IShellFolder_EnumObjects(psf, NULL, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS, &peidl);
     ok(hr == S_OK, "Got %08x\n", hr);




More information about the wine-cvs mailing list