From f10e6d7e37d348af584944c1c330f022d896d4fb Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Wed, 27 Jun 2007 00:12:07 +0200 Subject: [PATCH] quartz: Remove superfluous casts of void pointers to other pointer types. --- dlls/quartz/avidec.c | 4 ++-- dlls/quartz/enumregfilters.c | 4 ++-- dlls/quartz/filtergraph.c | 6 +++--- dlls/quartz/filtermapper.c | 2 +- dlls/quartz/regsvr.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c index 7f32288e8be..9e033c12f56 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 2e93c7b1044..2816f08f866 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 02728d5a802..df1929d67f6 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 a45f477f4b3..7f36fd2f5b8 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 ced43bcac3e..20bc5c4e731 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; -- 2.11.4.GIT