Commit a9ad3fed authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

ole32: Rename property variables in insertIntoTree.

parent 14647d7c
...@@ -190,7 +190,7 @@ static HRESULT destroyDirEntry( ...@@ -190,7 +190,7 @@ static HRESULT destroyDirEntry(
static HRESULT insertIntoTree( static HRESULT insertIntoTree(
StorageImpl *This, StorageImpl *This,
ULONG parentStorageIndex, ULONG parentStorageIndex,
ULONG newPropertyIndex); ULONG newEntryIndex);
static LONG propertyNameCmp( static LONG propertyNameCmp(
const OLECHAR *newProperty, const OLECHAR *newProperty,
...@@ -1253,53 +1253,53 @@ static LONG propertyNameCmp( ...@@ -1253,53 +1253,53 @@ static LONG propertyNameCmp(
static HRESULT insertIntoTree( static HRESULT insertIntoTree(
StorageImpl *This, StorageImpl *This,
ULONG parentStorageIndex, ULONG parentStorageIndex,
ULONG newPropertyIndex) ULONG newEntryIndex)
{ {
DirEntry currentProperty; DirEntry currentEntry;
DirEntry newProperty; DirEntry newEntry;
/* /*
* Read the inserted property * Read the inserted property
*/ */
StorageImpl_ReadDirEntry(This, StorageImpl_ReadDirEntry(This,
newPropertyIndex, newEntryIndex,
&newProperty); &newEntry);
/* /*
* Read the root property * Read the root property
*/ */
StorageImpl_ReadDirEntry(This, StorageImpl_ReadDirEntry(This,
parentStorageIndex, parentStorageIndex,
&currentProperty); &currentEntry);
if (currentProperty.dirRootEntry != DIRENTRY_NULL) if (currentEntry.dirRootEntry != DIRENTRY_NULL)
{ {
/* /*
* The root storage contains some element, therefore, start the research * The root storage contains some element, therefore, start the research
* for the appropriate location. * for the appropriate location.
*/ */
BOOL found = 0; BOOL found = 0;
ULONG current, next, previous, currentPropertyId; ULONG current, next, previous, currentEntryId;
/* /*
* Keep the DirEntry sequence number of the storage first property * Keep the DirEntry sequence number of the storage first property
*/ */
currentPropertyId = currentProperty.dirRootEntry; currentEntryId = currentEntry.dirRootEntry;
/* /*
* Read * Read
*/ */
StorageImpl_ReadDirEntry(This, StorageImpl_ReadDirEntry(This,
currentProperty.dirRootEntry, currentEntry.dirRootEntry,
&currentProperty); &currentEntry);
previous = currentProperty.leftChild; previous = currentEntry.leftChild;
next = currentProperty.rightChild; next = currentEntry.rightChild;
current = currentPropertyId; current = currentEntryId;
while (found == 0) while (found == 0)
{ {
LONG diff = propertyNameCmp( newProperty.name, currentProperty.name); LONG diff = propertyNameCmp( newEntry.name, currentEntry.name);
if (diff < 0) if (diff < 0)
{ {
...@@ -1307,15 +1307,15 @@ static HRESULT insertIntoTree( ...@@ -1307,15 +1307,15 @@ static HRESULT insertIntoTree(
{ {
StorageImpl_ReadDirEntry(This, StorageImpl_ReadDirEntry(This,
previous, previous,
&currentProperty); &currentEntry);
current = previous; current = previous;
} }
else else
{ {
currentProperty.leftChild = newPropertyIndex; currentEntry.leftChild = newEntryIndex;
StorageImpl_WriteDirEntry(This, StorageImpl_WriteDirEntry(This,
current, current,
&currentProperty); &currentEntry);
found = 1; found = 1;
} }
} }
...@@ -1325,15 +1325,15 @@ static HRESULT insertIntoTree( ...@@ -1325,15 +1325,15 @@ static HRESULT insertIntoTree(
{ {
StorageImpl_ReadDirEntry(This, StorageImpl_ReadDirEntry(This,
next, next,
&currentProperty); &currentEntry);
current = next; current = next;
} }
else else
{ {
currentProperty.rightChild = newPropertyIndex; currentEntry.rightChild = newEntryIndex;
StorageImpl_WriteDirEntry(This, StorageImpl_WriteDirEntry(This,
current, current,
&currentProperty); &currentEntry);
found = 1; found = 1;
} }
} }
...@@ -1346,8 +1346,8 @@ static HRESULT insertIntoTree( ...@@ -1346,8 +1346,8 @@ static HRESULT insertIntoTree(
return STG_E_FILEALREADYEXISTS; return STG_E_FILEALREADYEXISTS;
} }
previous = currentProperty.leftChild; previous = currentEntry.leftChild;
next = currentProperty.rightChild; next = currentEntry.rightChild;
} }
} }
else else
...@@ -1355,10 +1355,10 @@ static HRESULT insertIntoTree( ...@@ -1355,10 +1355,10 @@ static HRESULT insertIntoTree(
/* /*
* The root storage is empty, link the new property to its dir property * The root storage is empty, link the new property to its dir property
*/ */
currentProperty.dirRootEntry = newPropertyIndex; currentEntry.dirRootEntry = newEntryIndex;
StorageImpl_WriteDirEntry(This, StorageImpl_WriteDirEntry(This,
parentStorageIndex, parentStorageIndex,
&currentProperty); &currentEntry);
} }
return S_OK; return S_OK;
......
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