comctl32: Use FAILED instead of !SUCCEEDED.

This commit is contained in:
Michael Stefaniuc 2009-11-30 23:45:16 +01:00 committed by Alexandre Julliard
parent 35b2ca947c
commit 4376ccf3fc
2 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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");