diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c index 7f32288e8b..9e033c12f5 100644 --- a/dlls/quartz/avidec.c +++ b/dlls/quartz/avidec.c @@ -196,13 +196,13 @@ static HRESULT AVIDec_ConnectInput(TransformFilterImpl* pTransformFilter, const /* Copy bitmap header from media type to 1 for input and 1 for output */ bih_size = format->bmiHeader.biSize + format->bmiHeader.biClrUsed * 4; - This->pBihIn = (BITMAPINFOHEADER*)CoTaskMemAlloc(bih_size); + This->pBihIn = CoTaskMemAlloc(bih_size); if (!This->pBihIn) { hr = E_OUTOFMEMORY; goto failed; } - This->pBihOut = (BITMAPINFOHEADER*)CoTaskMemAlloc(bih_size); + This->pBihOut = CoTaskMemAlloc(bih_size); if (!This->pBihOut) { hr = E_OUTOFMEMORY; diff --git a/dlls/quartz/enumregfilters.c b/dlls/quartz/enumregfilters.c index 2e93c7b104..2816f08f86 100644 --- a/dlls/quartz/enumregfilters.c +++ b/dlls/quartz/enumregfilters.c @@ -67,7 +67,7 @@ HRESULT IEnumRegFiltersImpl_Construct(REGFILTER* pInRegFilters, const ULONG size for(i = 0; i < size; i++) { pRegFilters[i].Clsid = pInRegFilters[i].Clsid; - pRegFilters[i].Name = (WCHAR*)CoTaskMemAlloc((strlenW(pInRegFilters[i].Name)+1)*sizeof(WCHAR)); + pRegFilters[i].Name = CoTaskMemAlloc((strlenW(pInRegFilters[i].Name)+1)*sizeof(WCHAR)); if (!pRegFilters[i].Name) { while(i) @@ -152,7 +152,7 @@ static HRESULT WINAPI IEnumRegFiltersImpl_Next(IEnumRegFilters * iface, ULONG cF for(i = 0; i < cFetched; i++) { /* The string in the REGFILTER structure must be allocated in the same block as the REGFILTER structure itself */ - ppRegFilter[i] = (REGFILTER*)CoTaskMemAlloc(sizeof(REGFILTER)+(strlenW(This->RegFilters[i].Name)+1)*sizeof(WCHAR)); + ppRegFilter[i] = CoTaskMemAlloc(sizeof(REGFILTER)+(strlenW(This->RegFilters[i].Name)+1)*sizeof(WCHAR)); if (!ppRegFilter[i]) { while(i) diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 02728d5a80..df1929d67f 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -327,11 +327,11 @@ static HRESULT WINAPI GraphBuilder_AddFilter(IGraphBuilder *iface, int i,j; WCHAR* wszFilterName = NULL; int duplicate_name = FALSE; - + TRACE("(%p/%p)->(%p, %s (%p))\n", This, iface, pFilter, debugstr_w(pName), pName); - wszFilterName = (WCHAR*) CoTaskMemAlloc( (pName ? strlenW(pName) + 6 : 5) * sizeof(WCHAR) ); - + wszFilterName = CoTaskMemAlloc( (pName ? strlenW(pName) + 6 : 5) * sizeof(WCHAR) ); + if (pName) { /* Check if name already exists */ diff --git a/dlls/quartz/filtermapper.c b/dlls/quartz/filtermapper.c index a45f477f4b..7f36fd2f5b 100644 --- a/dlls/quartz/filtermapper.c +++ b/dlls/quartz/filtermapper.c @@ -706,7 +706,7 @@ static HRESULT WINAPI FilterMapper2_RegisterFilter( regfilter2.dwVersion = 2; regfilter2.dwMerit = prf2->dwMerit; regfilter2.u.s1.cPins2 = prf2->u.s.cPins; - pregfp2 = (REGFILTERPINS2*) CoTaskMemAlloc(prf2->u.s.cPins * sizeof(REGFILTERPINS2)); + pregfp2 = CoTaskMemAlloc(prf2->u.s.cPins * sizeof(REGFILTERPINS2)); regfilter2.u.s1.rgPins2 = pregfp2; for (i = 0; i < prf2->u.s.cPins; i++) { diff --git a/dlls/quartz/regsvr.c b/dlls/quartz/regsvr.c index ced43bcac3..20bc5c4e73 100644 --- a/dlls/quartz/regsvr.c +++ b/dlls/quartz/regsvr.c @@ -588,7 +588,7 @@ static HRESULT register_filters(struct regsvr_filter const *list) rf2.dwVersion = 2; rf2.dwMerit = list->merit; rf2.u.s1.cPins2 = i; - rf2.u.s1.rgPins2 = prfp2 = (REGFILTERPINS2*) CoTaskMemAlloc(i*sizeof(REGFILTERPINS2)); + rf2.u.s1.rgPins2 = prfp2 = CoTaskMemAlloc(i*sizeof(REGFILTERPINS2)); if (!prfp2) { hr = E_OUTOFMEMORY; break; @@ -600,7 +600,7 @@ static HRESULT register_filters(struct regsvr_filter const *list) for (nbmt = 0; list->pins[i].mediatypes[nbmt].majortype; nbmt++) ; /* Allocate a single buffer for regpintypes struct and clsids */ - lpMediatype = (REGPINTYPES*) CoTaskMemAlloc(nbmt*(sizeof(REGPINTYPES) + 2*sizeof(CLSID))); + lpMediatype = CoTaskMemAlloc(nbmt*(sizeof(REGPINTYPES) + 2*sizeof(CLSID))); if (!lpMediatype) { hr = E_OUTOFMEMORY; break;