[MPlayer-cvslog] r27870 - trunk/loader/dshow/outputpin.c

reimar subversion at mplayerhq.hu
Fri Oct 31 14:12:54 CET 2008


Author: reimar
Date: Fri Oct 31 14:12:54 2008
New Revision: 27870

Log:
Avoid useless casts of malloc results.


Modified:
   trunk/loader/dshow/outputpin.c

Modified: trunk/loader/dshow/outputpin.c
==============================================================================
--- trunk/loader/dshow/outputpin.c	(original)
+++ trunk/loader/dshow/outputpin.c	Fri Oct 31 14:12:54 2008
@@ -159,12 +159,12 @@ IMPLEMENT_IUNKNOWN(CEnumMediaTypes)
  */
 static CEnumMediaTypes* CEnumMediaTypesCreate(const AM_MEDIA_TYPE* amt)
 {
-    CEnumMediaTypes *This = (CEnumMediaTypes*) malloc(sizeof(CEnumMediaTypes)) ;
+    CEnumMediaTypes *This = malloc(sizeof(CEnumMediaTypes)) ;
 
     if (!This)
         return NULL;
 
-    This->vt = (IEnumMediaTypes_vt*) malloc(sizeof(IEnumMediaTypes_vt));
+    This->vt = malloc(sizeof(IEnumMediaTypes_vt));
     if (!This->vt)
     {
 	free(This);
@@ -893,15 +893,15 @@ static HRESULT STDCALL COutputMemPin_Rel
  */
 COutputPin* COutputPinCreate(const AM_MEDIA_TYPE* amt,SAMPLEPROC SampleProc,void* pUserData)
 {
-    COutputPin* This = (COutputPin*) malloc(sizeof(COutputPin));
+    COutputPin* This = malloc(sizeof(COutputPin));
     IMemInputPin_vt* ivt;
 
     if (!This)
         return NULL;
 
-    This->vt = (IPin_vt*) malloc(sizeof(IPin_vt));
-    This->mempin = (COutputMemPin*) malloc(sizeof(COutputMemPin));
-    ivt = (IMemInputPin_vt*) malloc(sizeof(IMemInputPin_vt));
+    This->vt = malloc(sizeof(IPin_vt));
+    This->mempin = malloc(sizeof(COutputMemPin));
+    ivt = malloc(sizeof(IMemInputPin_vt));
 
     if (!This->vt || !This->mempin || !ivt)
     {



More information about the MPlayer-cvslog mailing list