ole32: Remove redundant variables.
This commit is contained in:
parent
6fb39dfe4a
commit
5185409144
|
@ -192,13 +192,9 @@ AntiMonikerImpl_Load(IMoniker* iface,IStream* pStm)
|
||||||
static HRESULT WINAPI
|
static HRESULT WINAPI
|
||||||
AntiMonikerImpl_Save(IMoniker* iface,IStream* pStm,BOOL fClearDirty)
|
AntiMonikerImpl_Save(IMoniker* iface,IStream* pStm,BOOL fClearDirty)
|
||||||
{
|
{
|
||||||
DWORD constant=1;
|
static const DWORD constant = 1;
|
||||||
HRESULT res;
|
|
||||||
|
|
||||||
/* data written by this function is only a DWORD constant set to 1 ! */
|
/* data written by this function is only a DWORD constant set to 1 ! */
|
||||||
res=IStream_Write(pStm,&constant,sizeof(constant),NULL);
|
return IStream_Write(pStm,&constant,sizeof(constant),NULL);
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -614,9 +610,8 @@ static HRESULT AntiMonikerImpl_Construct(AntiMonikerImpl* This)
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
HRESULT WINAPI CreateAntiMoniker(LPMONIKER * ppmk)
|
HRESULT WINAPI CreateAntiMoniker(LPMONIKER * ppmk)
|
||||||
{
|
{
|
||||||
AntiMonikerImpl* newAntiMoniker = 0;
|
AntiMonikerImpl* newAntiMoniker;
|
||||||
HRESULT hr = S_OK;
|
HRESULT hr;
|
||||||
IID riid=IID_IMoniker;
|
|
||||||
|
|
||||||
TRACE("(%p)\n",ppmk);
|
TRACE("(%p)\n",ppmk);
|
||||||
|
|
||||||
|
@ -632,9 +627,7 @@ HRESULT WINAPI CreateAntiMoniker(LPMONIKER * ppmk)
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = AntiMonikerImpl_QueryInterface((IMoniker*)newAntiMoniker,&riid,(void**)ppmk);
|
return AntiMonikerImpl_QueryInterface((IMoniker*)newAntiMoniker,&IID_IMoniker,(void**)ppmk);
|
||||||
|
|
||||||
return hr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI AntiMonikerCF_QueryInterface(LPCLASSFACTORY iface,
|
static HRESULT WINAPI AntiMonikerCF_QueryInterface(LPCLASSFACTORY iface,
|
||||||
|
@ -677,7 +670,7 @@ static HRESULT WINAPI AntiMonikerCF_CreateInstance(LPCLASSFACTORY iface,
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
hr = IMoniker_QueryInterface(pMoniker, riid, ppv);
|
hr = IMoniker_QueryInterface(pMoniker, riid, ppv);
|
||||||
|
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
IMoniker_Release(pMoniker);
|
IMoniker_Release(pMoniker);
|
||||||
|
|
|
@ -285,8 +285,6 @@ BindCtxImpl_GetBindOptions(IBindCtx* iface,BIND_OPTS *pbindopts)
|
||||||
static HRESULT WINAPI
|
static HRESULT WINAPI
|
||||||
BindCtxImpl_GetRunningObjectTable(IBindCtx* iface,IRunningObjectTable** pprot)
|
BindCtxImpl_GetRunningObjectTable(IBindCtx* iface,IRunningObjectTable** pprot)
|
||||||
{
|
{
|
||||||
HRESULT res;
|
|
||||||
|
|
||||||
BindCtxImpl *This = (BindCtxImpl *)iface;
|
BindCtxImpl *This = (BindCtxImpl *)iface;
|
||||||
|
|
||||||
TRACE("(%p,%p)\n",This,pprot);
|
TRACE("(%p,%p)\n",This,pprot);
|
||||||
|
@ -294,9 +292,7 @@ BindCtxImpl_GetRunningObjectTable(IBindCtx* iface,IRunningObjectTable** pprot)
|
||||||
if (pprot==NULL)
|
if (pprot==NULL)
|
||||||
return E_POINTER;
|
return E_POINTER;
|
||||||
|
|
||||||
res=GetRunningObjectTable(0, pprot);
|
return GetRunningObjectTable(0, pprot);
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -555,9 +551,8 @@ static HRESULT BindCtxImpl_Construct(BindCtxImpl* This)
|
||||||
*/
|
*/
|
||||||
HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC * ppbc)
|
HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC * ppbc)
|
||||||
{
|
{
|
||||||
BindCtxImpl* newBindCtx = 0;
|
BindCtxImpl* newBindCtx;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
IID riid=IID_IBindCtx;
|
|
||||||
|
|
||||||
TRACE("(%d,%p)\n",reserved,ppbc);
|
TRACE("(%d,%p)\n",reserved,ppbc);
|
||||||
|
|
||||||
|
@ -582,9 +577,7 @@ HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC * ppbc)
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = BindCtxImpl_QueryInterface((IBindCtx*)newBindCtx,&riid,(void**)ppbc);
|
return BindCtxImpl_QueryInterface((IBindCtx*)newBindCtx,&IID_IBindCtx,(void**)ppbc);
|
||||||
|
|
||||||
return hr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
|
|
@ -210,9 +210,7 @@ static HRESULT WINAPI ClassMoniker_Save(IMoniker* iface,
|
||||||
hr = IStream_Write(pStm, &This->clsid, sizeof(This->clsid), NULL);
|
hr = IStream_Write(pStm, &This->clsid, sizeof(This->clsid), NULL);
|
||||||
if (FAILED(hr)) return hr;
|
if (FAILED(hr)) return hr;
|
||||||
|
|
||||||
hr = IStream_Write(pStm, &zero, sizeof(zero), NULL);
|
return IStream_Write(pStm, &zero, sizeof(zero), NULL);
|
||||||
|
|
||||||
return hr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
|
|
@ -655,17 +655,15 @@ static HRESULT DataCacheEntry_LoadData(DataCacheEntry *This)
|
||||||
static HRESULT DataCacheEntry_CreateStream(DataCacheEntry *This,
|
static HRESULT DataCacheEntry_CreateStream(DataCacheEntry *This,
|
||||||
IStorage *storage, IStream **stream)
|
IStorage *storage, IStream **stream)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
|
||||||
WCHAR wszName[] = {2,'O','l','e','P','r','e','s',
|
WCHAR wszName[] = {2,'O','l','e','P','r','e','s',
|
||||||
'0' + (This->stream_number / 100) % 10,
|
'0' + (This->stream_number / 100) % 10,
|
||||||
'0' + (This->stream_number / 10) % 10,
|
'0' + (This->stream_number / 10) % 10,
|
||||||
'0' + This->stream_number % 10, 0};
|
'0' + This->stream_number % 10, 0};
|
||||||
|
|
||||||
/* FIXME: cache the created stream in This? */
|
/* FIXME: cache the created stream in This? */
|
||||||
hr = IStorage_CreateStream(storage, wszName,
|
return IStorage_CreateStream(storage, wszName,
|
||||||
STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE,
|
STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE,
|
||||||
0, 0, stream);
|
0, 0, stream);
|
||||||
return hr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT DataCacheEntry_Save(DataCacheEntry *This, IStorage *storage,
|
static HRESULT DataCacheEntry_Save(DataCacheEntry *This, IStorage *storage,
|
||||||
|
|
|
@ -1146,14 +1146,11 @@ static HRESULT WINAPI DefaultHandler_EnumFormatEtc(
|
||||||
DWORD dwDirection,
|
DWORD dwDirection,
|
||||||
IEnumFORMATETC** ppenumFormatEtc)
|
IEnumFORMATETC** ppenumFormatEtc)
|
||||||
{
|
{
|
||||||
HRESULT hres;
|
|
||||||
DefaultHandler *This = impl_from_IDataObject(iface);
|
DefaultHandler *This = impl_from_IDataObject(iface);
|
||||||
|
|
||||||
TRACE("(%p, %x, %p)\n", iface, dwDirection, ppenumFormatEtc);
|
TRACE("(%p, %x, %p)\n", iface, dwDirection, ppenumFormatEtc);
|
||||||
|
|
||||||
hres = OleRegEnumFormatEtc(&This->clsid, dwDirection, ppenumFormatEtc);
|
return OleRegEnumFormatEtc(&This->clsid, dwDirection, ppenumFormatEtc);
|
||||||
|
|
||||||
return hres;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
|
|
|
@ -421,10 +421,7 @@ FileMonikerImpl_Save(IMoniker* iface, IStream* pStm, BOOL fClearDirty)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!bWriteWide)
|
if (!bWriteWide)
|
||||||
{
|
return IStream_Write(pStm,&ZERO,sizeof(DWORD),NULL);
|
||||||
res=IStream_Write(pStm,&ZERO,sizeof(DWORD),NULL);
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* write bytes needed for the filepathW (without 0) + 6 */
|
/* write bytes needed for the filepathW (without 0) + 6 */
|
||||||
bytesW = len*sizeof(WCHAR) + 6;
|
bytesW = len*sizeof(WCHAR) + 6;
|
||||||
|
@ -441,9 +438,7 @@ FileMonikerImpl_Save(IMoniker* iface, IStream* pStm, BOOL fClearDirty)
|
||||||
if (FAILED(res)) return res;
|
if (FAILED(res)) return res;
|
||||||
|
|
||||||
/* write W string (no 0) */
|
/* write W string (no 0) */
|
||||||
res=IStream_Write(pStm,filePathW,bytesW,NULL);
|
return IStream_Write(pStm,filePathW,bytesW,NULL);
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
|
Loading…
Reference in New Issue