Commit 3b956880 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ole32: Remove some casts that are not needed.

parent 5132f602
...@@ -2615,9 +2615,7 @@ static HRESULT StorageImpl_StreamWriteAt(StorageBaseImpl *base, DirRef index, ...@@ -2615,9 +2615,7 @@ static HRESULT StorageImpl_StreamWriteAt(StorageBaseImpl *base, DirRef index,
stream = *StorageImpl_GetCachedBlockChainStream(This, index); stream = *StorageImpl_GetCachedBlockChainStream(This, index);
if (!stream) return E_OUTOFMEMORY; if (!stream) return E_OUTOFMEMORY;
hr = BlockChainStream_WriteAt(stream, offset, size, buffer, bytesWritten); return BlockChainStream_WriteAt(stream, offset, size, buffer, bytesWritten);
return hr;
} }
} }
...@@ -3008,7 +3006,7 @@ end: ...@@ -3008,7 +3006,7 @@ end:
} }
else else
{ {
StorageImpl_Flush((StorageBaseImpl*)This); StorageImpl_Flush(&This->base);
*result = This; *result = This;
} }
...@@ -3048,9 +3046,9 @@ static void StorageImpl_Destroy(StorageBaseImpl* iface) ...@@ -3048,9 +3046,9 @@ static void StorageImpl_Destroy(StorageBaseImpl* iface)
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
} }
static HRESULT StorageImpl_Flush(StorageBaseImpl* iface) static HRESULT StorageImpl_Flush(StorageBaseImpl *storage)
{ {
StorageImpl *This = (StorageImpl*) iface; StorageImpl *This = (StorageImpl*)storage;
int i; int i;
HRESULT hr; HRESULT hr;
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
...@@ -3851,20 +3849,17 @@ HRESULT StorageImpl_ReadRawDirEntry(StorageImpl *This, ULONG index, BYTE *buffer ...@@ -3851,20 +3849,17 @@ HRESULT StorageImpl_ReadRawDirEntry(StorageImpl *This, ULONG index, BYTE *buffer
HRESULT StorageImpl_WriteRawDirEntry(StorageImpl *This, ULONG index, const BYTE *buffer) HRESULT StorageImpl_WriteRawDirEntry(StorageImpl *This, ULONG index, const BYTE *buffer)
{ {
ULARGE_INTEGER offset; ULARGE_INTEGER offset;
HRESULT hr;
ULONG bytesRead; ULONG bytesRead;
offset.u.HighPart = 0; offset.u.HighPart = 0;
offset.u.LowPart = index * RAW_DIRENTRY_SIZE; offset.u.LowPart = index * RAW_DIRENTRY_SIZE;
hr = BlockChainStream_WriteAt( return BlockChainStream_WriteAt(
This->rootBlockChain, This->rootBlockChain,
offset, offset,
RAW_DIRENTRY_SIZE, RAW_DIRENTRY_SIZE,
buffer, buffer,
&bytesRead); &bytesRead);
return hr;
} }
/****************************************************************************** /******************************************************************************
...@@ -4036,13 +4031,11 @@ HRESULT StorageImpl_WriteDirEntry( ...@@ -4036,13 +4031,11 @@ HRESULT StorageImpl_WriteDirEntry(
DirRef index, DirRef index,
const DirEntry* buffer) const DirEntry* buffer)
{ {
BYTE currentEntry[RAW_DIRENTRY_SIZE]; BYTE currentEntry[RAW_DIRENTRY_SIZE];
HRESULT writeRes;
UpdateRawDirEntry(currentEntry, buffer); UpdateRawDirEntry(currentEntry, buffer);
writeRes = StorageImpl_WriteRawDirEntry(This, index, currentEntry); return StorageImpl_WriteRawDirEntry(This, index, currentEntry);
return writeRes;
} }
static BOOL StorageImpl_ReadBigBlock( static BOOL StorageImpl_ReadBigBlock(
...@@ -5187,7 +5180,7 @@ static HRESULT TransactedSnapshotImpl_Construct(StorageBaseImpl *parentStorage, ...@@ -5187,7 +5180,7 @@ static HRESULT TransactedSnapshotImpl_Construct(StorageBaseImpl *parentStorage,
/* parentStorage already has 1 reference, which we take over here. */ /* parentStorage already has 1 reference, which we take over here. */
(*result)->transactedParent = parentStorage; (*result)->transactedParent = parentStorage;
parentStorage->transactedChild = (StorageBaseImpl*)*result; parentStorage->transactedChild = &(*result)->base;
(*result)->base.storageDirEntry = TransactedSnapshotImpl_CreateStubEntry(*result, parentStorage->storageDirEntry); (*result)->base.storageDirEntry = TransactedSnapshotImpl_CreateStubEntry(*result, parentStorage->storageDirEntry);
} }
...@@ -5199,7 +5192,7 @@ static HRESULT TransactedSnapshotImpl_Construct(StorageBaseImpl *parentStorage, ...@@ -5199,7 +5192,7 @@ static HRESULT TransactedSnapshotImpl_Construct(StorageBaseImpl *parentStorage,
} }
} }
if (FAILED(hr)) HeapFree(GetProcessHeap(), 0, (*result)); if (FAILED(hr)) HeapFree(GetProcessHeap(), 0, *result);
return hr; return hr;
} }
......
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