diff loader/dmo/buffer.c @ 30702:9fc9d1e788aa

Do not cast the results of malloc/calloc/realloc. These functions return void*, which is compatible with any pointer, so there is no need for casts.
author diego
date Fri, 26 Feb 2010 15:01:37 +0000
parents 008338d7679f
children
line wrap: on
line diff
--- a/loader/dmo/buffer.c	Fri Feb 26 12:49:49 2010 +0000
+++ b/loader/dmo/buffer.c	Fri Feb 26 15:01:37 2010 +0000
@@ -69,12 +69,12 @@
 CMediaBuffer* CMediaBufferCreate(unsigned long maxlen, void* mem,
 				 unsigned long len, int copy)
 {
-    CMediaBuffer* This = (CMediaBuffer*) malloc(sizeof(CMediaBuffer));
+    CMediaBuffer* This = malloc(sizeof(CMediaBuffer));
 
     if (!This)
         return NULL;
 
-    This->vt = (IMediaBuffer_vt*) malloc(sizeof(IMediaBuffer_vt));
+    This->vt = malloc(sizeof(IMediaBuffer_vt));
     if (!This->vt)
     {
         CMediaBuffer_Destroy(This);