oleaut32: Do not cast NULL.

Michael Stefaniuc mstefani at redhat.de
Sat Nov 1 18:21:15 CDT 2008


---
 dlls/oleaut32/olepicture.c |    4 +---
 dlls/oleaut32/ungif.c      |   12 ++++++------
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
index 93b932f..498ee53 100644
--- a/dlls/oleaut32/olepicture.c
+++ b/dlls/oleaut32/olepicture.c
@@ -1610,9 +1610,7 @@ succ:
 
 end:
     if(png_ptr)
-        ppng_destroy_read_struct(&png_ptr,
-                                (info_ptr ? &info_ptr : (png_infopp) NULL),
-                                (png_infopp)NULL);
+        ppng_destroy_read_struct(&png_ptr, info_ptr ? &info_ptr : NULL, NULL);
     HeapFree(GetProcessHeap(), 0, row_pointers);
     HeapFree(GetProcessHeap(), 0, pngdata);
     return ret;
diff --git a/dlls/oleaut32/ungif.c b/dlls/oleaut32/ungif.c
index 9cb5693..79bad60 100644
--- a/dlls/oleaut32/ungif.c
+++ b/dlls/oleaut32/ungif.c
@@ -148,16 +148,16 @@ MakeMapObject(int ColorCount,
     /*** FIXME: Our ColorCount has to be a power of two.  Is it necessary to
      * make the user know that or should we automatically round up instead? */
     if (ColorCount != (1 << BitSize(ColorCount))) {
-        return ((ColorMapObject *) NULL);
+        return NULL;
     }
 
     Object = ungif_alloc(sizeof(ColorMapObject));
-    if (Object == (ColorMapObject *) NULL) {
-        return ((ColorMapObject *) NULL);
+    if (Object == NULL) {
+        return NULL;
     }
 
     Object->Colors = ungif_calloc(ColorCount, sizeof(GifColorType));
-    if (Object->Colors == (GifColorType *) NULL) {
+    if (Object->Colors == NULL) {
         return NULL;
     }
 
@@ -413,9 +413,9 @@ DGifGetImageDesc(GifFileType * GifFile) {
             return GIF_ERROR;
         }
     }
-    sp->RasterBits = (unsigned char *)NULL;
+    sp->RasterBits = NULL;
     sp->ExtensionBlockCount = 0;
-    sp->ExtensionBlocks = (ExtensionBlock *) NULL;
+    sp->ExtensionBlocks = NULL;
 
     GifFile->ImageCount++;
 
-- 
1.6.0.3
-------------- 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/20081102/35c9769d/attachment-0001.pgp 


More information about the wine-patches mailing list