shell32/tests: Use FAILED instead of !SUCCEEDED.
Michael Stefaniuc
mstefani at redhat.de
Tue Oct 7 18:32:27 CDT 2008
---
Idea for this janitorial work was inspired by James Hawkins email to
wine-devel http://www.winehq.org/pipermail/wine-devel/2008-October/069564.html
dlls/shell32/tests/shelllink.c | 12 ++++++------
dlls/shell32/tests/shlexec.c | 2 +-
dlls/shell32/tests/shlfileop.c | 2 +-
dlls/shell32/tests/shlfolder.c | 2 +-
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/shell32/tests/shelllink.c b/dlls/shell32/tests/shelllink.c
index 47aa659..83aae3f 100644
--- a/dlls/shell32/tests/shelllink.c
+++ b/dlls/shell32/tests/shelllink.c
@@ -114,7 +114,7 @@ static void test_get_set(void)
r = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
&IID_IShellLinkA, (LPVOID*)&sl);
ok(SUCCEEDED(r), "no IID_IShellLinkA (0x%08x)\n", r);
- if (!SUCCEEDED(r))
+ if (FAILED(r))
return;
/* Test Getting / Setting the description */
@@ -329,7 +329,7 @@ void create_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int save_fails)
r = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
&IID_IShellLinkA, (LPVOID*)&sl);
lok(SUCCEEDED(r), "no IID_IShellLinkA (0x%08x)\n", r);
- if (!SUCCEEDED(r))
+ if (FAILED(r))
return;
if (desc->description)
@@ -404,12 +404,12 @@ static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo)
r = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
&IID_IShellLinkA, (LPVOID*)&sl);
lok(SUCCEEDED(r), "no IID_IShellLinkA (0x%08x)\n", r);
- if (!SUCCEEDED(r))
+ if (FAILED(r))
return;
r = IShellLinkA_QueryInterface(sl, &IID_IPersistFile, (LPVOID*)&pf);
lok(SUCCEEDED(r), "no IID_IPersistFile (0x%08x)\n", r);
- if (!SUCCEEDED(r))
+ if (FAILED(r))
{
IShellLinkA_Release(sl);
return;
@@ -418,7 +418,7 @@ static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo)
r = IPersistFile_Load(pf, path, STGM_READ);
lok(SUCCEEDED(r), "load failed (0x%08x)\n", r);
IPersistFile_Release(pf);
- if (!SUCCEEDED(r))
+ if (FAILED(r))
{
IShellLinkA_Release(sl);
return;
@@ -715,7 +715,7 @@ START_TEST(shelllink)
r = CoInitialize(NULL);
ok(SUCCEEDED(r), "CoInitialize failed (0x%08x)\n", r);
- if (!SUCCEEDED(r))
+ if (FAILED(r))
return;
test_get_set();
diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c
index 5eed12b..3c62ac2 100644
--- a/dlls/shell32/tests/shlexec.c
+++ b/dlls/shell32/tests/shlexec.c
@@ -1505,7 +1505,7 @@ static void init_test(void)
r = CoInitialize(NULL);
ok(SUCCEEDED(r), "CoInitialize failed (0x%08x)\n", r);
- if (!SUCCEEDED(r))
+ if (FAILED(r))
exit(1);
rc=GetModuleFileName(NULL, argv0, sizeof(argv0));
diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c
index a4d2559..11cc612 100644
--- a/dlls/shell32/tests/shlfileop.c
+++ b/dlls/shell32/tests/shlfileop.c
@@ -275,7 +275,7 @@ static void test_get_file_info_iconlist(void)
SHFILEINFOW shInfow;
hr = SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidList);
- if (!SUCCEEDED(hr)) {
+ if (FAILED(hr)) {
skip("can't get desktop pidl\n");
return;
}
diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c
index a5fff49..30768b0 100644
--- a/dlls/shell32/tests/shlfolder.c
+++ b/dlls/shell32/tests/shlfolder.c
@@ -1398,7 +1398,7 @@ static void testSHGetFolderPathAndSubDirA(void)
skip("SHGetFolderPathA not present!\n");
return;
}
- if(!SUCCEEDED(pSHGetFolderPathA(NULL, CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, appdata)))
+ if(FAILED(pSHGetFolderPathA(NULL, CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, appdata)))
{
skip("SHGetFolderPathA failed for CSIDL_LOCAL_APPDATA!\n");
return;
--
1.6.0.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20081008/988e1c26/attachment.pgp
More information about the wine-patches
mailing list