changeset 27836:bf7f14c6dfaa

Avoid useless casts of malloc results.
author reimar
date Fri, 31 Oct 2008 13:12:54 +0000
parents 28b6709b52a2
children 2a36db2f583d
files loader/dshow/outputpin.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/loader/dshow/outputpin.c	Fri Oct 31 12:59:17 2008 +0000
+++ b/loader/dshow/outputpin.c	Fri Oct 31 13:12:54 2008 +0000
@@ -159,12 +159,12 @@
  */
 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 @@
  */
 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)
     {