From 4376ccf3fc403ca9801e3f102d928c81ce63b55a Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Mon, 30 Nov 2009 23:45:16 +0100 Subject: [PATCH] comctl32: Use FAILED instead of !SUCCEEDED. --- 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 9f310c302f9..53a558f1547 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; @@ -3101,7 +3101,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; @@ -3126,7 +3126,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; @@ -3260,7 +3260,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 e06b9746805..52907887979 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");