[PATCH] comctl32: Use FAILED instead of !SUCCEEDED.

Michael Stefaniuc mstefani at redhat.de
Mon Nov 30 16:45:16 CST 2009


---
 dlls/comctl32/imagelist.c       |    8 ++++----
 dlls/comctl32/tests/imagelist.c |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c
index fb089aa..30576f3 100644
--- a/dlls/comctl32/imagelist.c
+++ b/dlls/comctl32/imagelist.c
@@ -598,7 +598,7 @@ ImageList_Create (INT cx, INT cy, UINT flags,
     TRACE("(%d %d 0x%x %d %d)\n", cx, cy, flags, cInitial, cGrow);
 
     /* Create the IImageList interface for the image list */
-    if (!SUCCEEDED(ImageListImpl_CreateInstance(NULL, &IID_IImageList, (void **) &himl)))
+    if (FAILED(ImageListImpl_CreateInstance(NULL, &IID_IImageList, (void **)&himl)))
         return NULL;
 
     cGrow = (cGrow < 4) ? 4 : (cGrow + 3) & ~3;
@@ -3105,7 +3105,7 @@ static HRESULT WINAPI ImageListImpl_Copy(IImageList *iface, int iDst,
         return E_FAIL;
 
     /* TODO: Add test for IID_ImageList2 too */
-    if (!SUCCEEDED(IImageList_QueryInterface(punkSrc, &IID_IImageList,
+    if (FAILED(IImageList_QueryInterface(punkSrc, &IID_IImageList,
             (void **) &src)))
         return E_FAIL;
 
@@ -3130,7 +3130,7 @@ static HRESULT WINAPI ImageListImpl_Merge(IImageList *iface, int i1,
         return E_FAIL;
 
     /* TODO: Add test for IID_ImageList2 too */
-    if (!SUCCEEDED(IImageList_QueryInterface(punk2, &IID_IImageList,
+    if (FAILED(IImageList_QueryInterface(punk2, &IID_IImageList,
             (void **) &iml2)))
         return E_FAIL;
 
@@ -3264,7 +3264,7 @@ static HRESULT WINAPI ImageListImpl_SetDragCursorImage(IImageList *iface,
         return E_FAIL;
 
     /* TODO: Add test for IID_ImageList2 too */
-    if (!SUCCEEDED(IImageList_QueryInterface(punk, &IID_IImageList,
+    if (FAILED(IImageList_QueryInterface(punk, &IID_IImageList,
             (void **) &iml2)))
         return E_FAIL;
 
diff --git a/dlls/comctl32/tests/imagelist.c b/dlls/comctl32/tests/imagelist.c
index e06b974..5290788 100644
--- a/dlls/comctl32/tests/imagelist.c
+++ b/dlls/comctl32/tests/imagelist.c
@@ -1424,7 +1424,7 @@ static void DoTest1_v6(void)
     ok(SUCCEEDED(IImageList_ReplaceIcon(imgl, -1, hicon3, &ret)) && (ret == 2),"failed to add icon3\n");
 
     /* remove an index out of range */
-    ok(!SUCCEEDED(IImageList_Remove(imgl,4711)),"removed nonexistent icon\n");
+    ok(FAILED(IImageList_Remove(imgl, 4711)),"removed nonexistent icon\n");
 
     /* remove three */
     ok(SUCCEEDED(IImageList_Remove(imgl,0)),"can't remove 0\n");
@@ -1432,7 +1432,7 @@ static void DoTest1_v6(void)
     ok(SUCCEEDED(IImageList_Remove(imgl,0)),"can't remove 0\n");
 
     /* remove one extra */
-    ok(!SUCCEEDED(IImageList_Remove(imgl,0)),"removed nonexistent icon\n");
+    ok(FAILED(IImageList_Remove(imgl, 0)),"removed nonexistent icon\n");
 
     /* check SetImageCount/GetImageCount */
     ok(SUCCEEDED(IImageList_SetImageCount(imgl, 3)), "couldn't increase image count\n");
-- 
1.6.5.3



More information about the wine-patches mailing list