comctl32: Use FAILED instead of !SUCCEEDED.

Michael Stefaniuc mstefani at redhat.de
Tue Oct 7 18:33:06 CDT 2008


---
 dlls/comctl32/imagelist.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c
index 0bafb40..b888bf1 100644
--- a/dlls/comctl32/imagelist.c
+++ b/dlls/comctl32/imagelist.c
@@ -1912,13 +1912,13 @@ static BOOL _read_bitmap(HDC hdcIml, LPSTREAM pstm)
     int                result = FALSE;
     LPBYTE             bits = NULL;
 
-    if (!SUCCEEDED(IStream_Read ( pstm, &bmfh, sizeof(bmfh), NULL)))
+    if (FAILED(IStream_Read ( pstm, &bmfh, sizeof(bmfh), NULL)))
         return FALSE;
 
     if (bmfh.bfType != (('M'<<8)|'B'))
         return FALSE;
 
-    if (!SUCCEEDED(IStream_Read ( pstm, &bmi->bmiHeader, sizeof(bmi->bmiHeader), NULL)))
+    if (FAILED(IStream_Read ( pstm, &bmi->bmiHeader, sizeof(bmi->bmiHeader), NULL)))
         return FALSE;
 
     if ((bmi->bmiHeader.biSize != sizeof(bmi->bmiHeader)))
@@ -1937,13 +1937,13 @@ static BOOL _read_bitmap(HDC hdcIml, LPSTREAM pstm)
     bmi->bmiHeader.biSizeImage = DIB_GetDIBImageBytes(bmi->bmiHeader.biWidth, bmi->bmiHeader.biHeight, bitsperpixel);
 
     /* read the palette right after the end of the bitmapinfoheader */
-    if (palspace && !SUCCEEDED(IStream_Read(pstm, bmi->bmiColors, palspace, NULL)))
+    if (palspace && FAILED(IStream_Read(pstm, bmi->bmiColors, palspace, NULL)))
 	goto error;
 
     bits = Alloc(bmi->bmiHeader.biSizeImage);
     if (!bits)
         goto error;
-    if (!SUCCEEDED(IStream_Read(pstm, bits, bmi->bmiHeader.biSizeImage, NULL)))
+    if (FAILED(IStream_Read(pstm, bits, bmi->bmiHeader.biSizeImage, NULL)))
         goto error;
 
     if (!StretchDIBits(hdcIml, 0, 0, bmi->bmiHeader.biWidth, bmi->bmiHeader.biHeight,
@@ -1996,7 +1996,7 @@ HIMAGELIST WINAPI ImageList_Read (LPSTREAM pstm)
 
     TRACE("%p\n", pstm);
 
-    if (!SUCCEEDED(IStream_Read (pstm, &ilHead, sizeof(ILHEAD), NULL)))
+    if (FAILED(IStream_Read (pstm, &ilHead, sizeof(ILHEAD), NULL)))
 	return NULL;
     if (ilHead.usMagic != (('L' << 8) | 'I'))
 	return NULL;
@@ -2744,7 +2744,7 @@ _write_bitmap(HBITMAP hBitmap, LPSTREAM pstm)
 	inf->bmiColors[1].rgbRed = inf->bmiColors[1].rgbGreen = inf->bmiColors[1].rgbBlue = 0xff;
     }
 
-    if(!SUCCEEDED(IStream_Write(pstm, data, totalSize, NULL)))
+    if(FAILED(IStream_Write(pstm, data, totalSize, NULL)))
 	goto failed;
 
     result = TRUE;
@@ -2800,7 +2800,7 @@ ImageList_Write (HIMAGELIST himl, LPSTREAM pstm)
     TRACE("cx %u, cy %u, flags 0x04%x, cCurImage %u, cMaxImage %u\n",
           ilHead.cx, ilHead.cy, ilHead.flags, ilHead.cCurImage, ilHead.cMaxImage);
 
-    if(!SUCCEEDED(IStream_Write(pstm, &ilHead, sizeof(ILHEAD), NULL)))
+    if(FAILED(IStream_Write(pstm, &ilHead, sizeof(ILHEAD), NULL)))
 	return FALSE;
 
     /* write the bitmap */
-- 
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/61424a62/attachment.pgp 


More information about the wine-patches mailing list