diff Gui/bitmap.c @ 19061:86350b4b8203

drops casts from void * on malloc/calloc from the gui code
author reynaldo
date Thu, 13 Jul 2006 16:17:24 +0000
parents 0e1471d9da74
children
line wrap: on
line diff
--- a/Gui/bitmap.c	Thu Jul 13 13:28:56 2006 +0000
+++ b/Gui/bitmap.c	Thu Jul 13 16:17:24 2006 +0000
@@ -38,7 +38,7 @@
  png_read_info( png,info );
  png_get_IHDR( png,info,&bf->Width,&bf->Height,&bf->BPP,&color,NULL,NULL,NULL );
 
- row_p=(png_bytep *)malloc( sizeof( png_bytep ) * bf->Height );
+ row_p=malloc( sizeof( png_bytep ) * bf->Height );
  if ( !row_p )
   {
    mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[png]  not enough memory for row buffer\n" );
@@ -198,7 +198,7 @@
  out->BPP=1;
  out->ImageSize=(out->Width * out->Height + 7) / 8;
  mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[c32to1] imagesize: %d\n",out->ImageSize );
- out->Image=(char *)calloc( 1,out->ImageSize );
+ out->Image=calloc( 1,out->ImageSize );
  if ( out->Image == NULL ) mp_msg( MSGT_GPLAYER,MSGL_WARN,MSGTR_NotEnoughMemoryC32To1 );
  {
   int i,b,c=0; unsigned int * buf = NULL; unsigned char tmp = 0; int nothaveshape = 1;
@@ -221,7 +221,7 @@
  out->Height=in->Height;
  out->BPP=32;
  out->ImageSize=out->Width * out->Height * 4;
- out->Image=(char *)calloc( 1,out->ImageSize );
+ out->Image=calloc( 1,out->ImageSize );
  mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[c1to32] imagesize: %d\n",out->ImageSize );
  if ( out->Image == NULL ) mp_msg( MSGT_GPLAYER,MSGL_WARN,MSGTR_NotEnoughMemoryC1To32 );
  {