mirror of https://github.com/mpv-player/mpv
Avoid useless casts of malloc results.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27870 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
aa589da439
commit
fa504971c5
|
@ -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_Release(IUnknown* This)
|
|||
*/
|
||||
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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue