From 2b8823150ce251f04535e02f4b0f442216832a01 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Wed, 28 Oct 2009 14:33:12 -0500 Subject: [PATCH 03/13] ole32: Take a StorageBaseImpl in updatePropertyChain. The function is not always called with a top-level storage object, and the signature should reflect that. --- dlls/ole32/storage32.c | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index b793b85..4343281 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -184,7 +184,7 @@ static HRESULT createDirEntry( ULONG *index); static void updatePropertyChain( - StorageImpl *storage, + StorageBaseImpl *storage, ULONG newPropertyIndex, StgProperty newProperty); @@ -765,7 +765,7 @@ static HRESULT WINAPI StorageBaseImpl_RenameElement( * Find a spot in the property chain for our newly created property. */ updatePropertyChain( - (StorageImpl*)This, + This, renamedPropertyIndex, renamedProperty); @@ -945,7 +945,7 @@ static HRESULT WINAPI StorageBaseImpl_CreateStream( * Find a spot in the property chain for our newly created property. */ updatePropertyChain( - (StorageImpl*)This, + This, newPropertyIndex, newStreamProperty); @@ -1128,7 +1128,7 @@ static HRESULT WINAPI StorageImpl_CreateStorage( * Find a spot in the property chain for our newly created property. */ updatePropertyChain( - This, + &This->base, newPropertyIndex, newProperty); @@ -1292,7 +1292,7 @@ static LONG propertyNameCmp( * Properly link this new element in the property chain. */ static void updatePropertyChain( - StorageImpl *storage, + StorageBaseImpl *storage, ULONG newPropertyIndex, StgProperty newProperty) { @@ -1301,8 +1301,8 @@ static void updatePropertyChain( /* * Read the root property */ - StorageImpl_ReadProperty(storage->base.ancestorStorage, - storage->base.rootPropertySetIndex, + StorageImpl_ReadProperty(storage->ancestorStorage, + storage->rootPropertySetIndex, ¤tProperty); if (currentProperty.dirProperty != PROPERTY_NULL) @@ -1322,7 +1322,7 @@ static void updatePropertyChain( /* * Read */ - StorageImpl_ReadProperty(storage->base.ancestorStorage, + StorageImpl_ReadProperty(storage->ancestorStorage, currentProperty.dirProperty, ¤tProperty); @@ -1338,7 +1338,7 @@ static void updatePropertyChain( { if (previous != PROPERTY_NULL) { - StorageImpl_ReadProperty(storage->base.ancestorStorage, + StorageImpl_ReadProperty(storage->ancestorStorage, previous, ¤tProperty); current = previous; @@ -1346,7 +1346,7 @@ static void updatePropertyChain( else { currentProperty.leftChild = newPropertyIndex; - StorageImpl_WriteProperty(storage->base.ancestorStorage, + StorageImpl_WriteProperty(storage->ancestorStorage, current, ¤tProperty); found = 1; @@ -1356,7 +1356,7 @@ static void updatePropertyChain( { if (next != PROPERTY_NULL) { - StorageImpl_ReadProperty(storage->base.ancestorStorage, + StorageImpl_ReadProperty(storage->ancestorStorage, next, ¤tProperty); current = next; @@ -1364,7 +1364,7 @@ static void updatePropertyChain( else { currentProperty.rightChild = newPropertyIndex; - StorageImpl_WriteProperty(storage->base.ancestorStorage, + StorageImpl_WriteProperty(storage->ancestorStorage, current, ¤tProperty); found = 1; @@ -1389,8 +1389,8 @@ static void updatePropertyChain( * The root storage is empty, link the new property to its dir property */ currentProperty.dirProperty = newPropertyIndex; - StorageImpl_WriteProperty(storage->base.ancestorStorage, - storage->base.rootPropertySetIndex, + StorageImpl_WriteProperty(storage->ancestorStorage, + storage->rootPropertySetIndex, ¤tProperty); } } -- 1.6.3.3