Commit a3a97558 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ole32: No need to test for null implementation pointer in methods.

parent ac032593
...@@ -365,7 +365,7 @@ static HRESULT WINAPI StorageBaseImpl_QueryInterface( ...@@ -365,7 +365,7 @@ static HRESULT WINAPI StorageBaseImpl_QueryInterface(
{ {
StorageBaseImpl *This = impl_from_IStorage(iface); StorageBaseImpl *This = impl_from_IStorage(iface);
if ( (This==0) || (ppvObject==0) ) if (!ppvObject)
return E_INVALIDARG; return E_INVALIDARG;
*ppvObject = 0; *ppvObject = 0;
...@@ -379,8 +379,7 @@ static HRESULT WINAPI StorageBaseImpl_QueryInterface( ...@@ -379,8 +379,7 @@ static HRESULT WINAPI StorageBaseImpl_QueryInterface(
{ {
*ppvObject = &This->IPropertySetStorage_iface; *ppvObject = &This->IPropertySetStorage_iface;
} }
else
if ((*ppvObject)==0)
return E_NOINTERFACE; return E_NOINTERFACE;
IStorage_AddRef(iface); IStorage_AddRef(iface);
...@@ -578,7 +577,7 @@ static HRESULT WINAPI StorageBaseImpl_OpenStorage( ...@@ -578,7 +577,7 @@ static HRESULT WINAPI StorageBaseImpl_OpenStorage(
iface, debugstr_w(pwcsName), pstgPriority, iface, debugstr_w(pwcsName), pstgPriority,
grfMode, snbExclude, reserved, ppstg); grfMode, snbExclude, reserved, ppstg);
if ( (This==0) || (pwcsName==NULL) || (ppstg==0) ) if ((pwcsName==NULL) || (ppstg==0) )
{ {
res = E_INVALIDARG; res = E_INVALIDARG;
goto end; goto end;
...@@ -709,7 +708,7 @@ static HRESULT WINAPI StorageBaseImpl_EnumElements( ...@@ -709,7 +708,7 @@ static HRESULT WINAPI StorageBaseImpl_EnumElements(
TRACE("(%p, %d, %p, %d, %p)\n", TRACE("(%p, %d, %p, %d, %p)\n",
iface, reserved1, reserved2, reserved3, ppenum); iface, reserved1, reserved2, reserved3, ppenum);
if ( (This==0) || (ppenum==0)) if (!ppenum)
return E_INVALIDARG; return E_INVALIDARG;
if (This->reverted) if (This->reverted)
...@@ -719,7 +718,7 @@ static HRESULT WINAPI StorageBaseImpl_EnumElements( ...@@ -719,7 +718,7 @@ static HRESULT WINAPI StorageBaseImpl_EnumElements(
This, This,
This->storageDirEntry); This->storageDirEntry);
if (newEnum!=0) if (newEnum)
{ {
*ppenum = &newEnum->IEnumSTATSTG_iface; *ppenum = &newEnum->IEnumSTATSTG_iface;
...@@ -750,7 +749,7 @@ static HRESULT WINAPI StorageBaseImpl_Stat( ...@@ -750,7 +749,7 @@ static HRESULT WINAPI StorageBaseImpl_Stat(
TRACE("(%p, %p, %x)\n", TRACE("(%p, %p, %x)\n",
iface, pstatstg, grfStatFlag); iface, pstatstg, grfStatFlag);
if ( (This==0) || (pstatstg==0)) if (!pstatstg)
{ {
res = E_INVALIDARG; res = E_INVALIDARG;
goto end; goto end;
...@@ -2076,7 +2075,7 @@ static HRESULT deleteStorageContents( ...@@ -2076,7 +2075,7 @@ static HRESULT deleteStorageContents(
/* /*
* Open the storage and enumerate it * Open the storage and enumerate it
*/ */
hr = StorageBaseImpl_OpenStorage( hr = IStorage_OpenStorage(
&parentStorage->IStorage_iface, &parentStorage->IStorage_iface,
entryDataToDelete.name, entryDataToDelete.name,
0, 0,
...@@ -2209,11 +2208,11 @@ static HRESULT removeFromTree( ...@@ -2209,11 +2208,11 @@ static HRESULT removeFromTree(
DirRef parentStorageIndex, DirRef parentStorageIndex,
DirRef deletedIndex) DirRef deletedIndex)
{ {
HRESULT hr = S_OK;
DirEntry entryToDelete; DirEntry entryToDelete;
DirEntry parentEntry; DirEntry parentEntry;
DirRef parentEntryRef; DirRef parentEntryRef;
ULONG typeOfRelation; ULONG typeOfRelation;
HRESULT hr;
hr = StorageBaseImpl_ReadDirEntry(This, deletedIndex, &entryToDelete); hr = StorageBaseImpl_ReadDirEntry(This, deletedIndex, &entryToDelete);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment