mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 04:35:53 +00:00
[SDK:CMLIB][MKHIVE][BOOT:ENVIRON][NTOS:CONFIG] Add missing HvGetCell casts. Replace some ASSERT(FALSE).
This commit is contained in:
parent
641fdb342e
commit
a4cad7be6b
8 changed files with 36 additions and 36 deletions
|
@ -87,7 +87,7 @@ CmpPrepareIndexOfKeys(
|
|||
{
|
||||
for (i = 0; i < IndexCell->Count; i++)
|
||||
{
|
||||
PCM_KEY_INDEX SubIndexCell = HvGetCell(RegistryHive, IndexCell->List[i]);
|
||||
PCM_KEY_INDEX SubIndexCell = (PCM_KEY_INDEX)HvGetCell(RegistryHive, IndexCell->List[i]);
|
||||
if (SubIndexCell->Signature == CM_KEY_NODE_SIGNATURE)
|
||||
CmpPrepareKey(RegistryHive, (PCM_KEY_NODE)SubIndexCell);
|
||||
else
|
||||
|
@ -100,7 +100,7 @@ CmpPrepareIndexOfKeys(
|
|||
PCM_KEY_FAST_INDEX HashCell = (PCM_KEY_FAST_INDEX)IndexCell;
|
||||
for (i = 0; i < HashCell->Count; i++)
|
||||
{
|
||||
PCM_KEY_NODE SubKeyCell = HvGetCell(RegistryHive, HashCell->List[i].Cell);
|
||||
PCM_KEY_NODE SubKeyCell = (PCM_KEY_NODE)HvGetCell(RegistryHive, HashCell->List[i].Cell);
|
||||
CmpPrepareKey(RegistryHive, SubKeyCell);
|
||||
}
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ CmpPrepareKey(
|
|||
/* Enumerate and add subkeys */
|
||||
if (KeyCell->SubKeyCounts[Stable] > 0)
|
||||
{
|
||||
IndexCell = HvGetCell(RegistryHive, KeyCell->SubKeyLists[Stable]);
|
||||
IndexCell = (PCM_KEY_INDEX)HvGetCell(RegistryHive, KeyCell->SubKeyLists[Stable]);
|
||||
CmpPrepareIndexOfKeys(RegistryHive, IndexCell);
|
||||
}
|
||||
}
|
||||
|
@ -137,6 +137,6 @@ CmPrepareHive(
|
|||
{
|
||||
PCM_KEY_NODE RootCell;
|
||||
|
||||
RootCell = HvGetCell(RegistryHive, RegistryHive->BaseBlock->RootCell);
|
||||
RootCell = (PCM_KEY_NODE)HvGetCell(RegistryHive, RegistryHive->BaseBlock->RootCell);
|
||||
CmpPrepareKey(RegistryHive, RootCell);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ CmpMarkKeyDirty(IN PHHIVE Hive,
|
|||
ULONG i;
|
||||
|
||||
/* Get the cell data for our target */
|
||||
CellData = HvGetCell(Hive, Cell);
|
||||
CellData = (PCM_KEY_NODE)HvGetCell(Hive, Cell);
|
||||
if (!CellData) return FALSE;
|
||||
|
||||
/* Check if sanity checks requested */
|
||||
|
@ -63,8 +63,8 @@ CmpMarkKeyDirty(IN PHHIVE Hive,
|
|||
HvMarkCellDirty(Hive, CellData->Security, FALSE);
|
||||
|
||||
/* Get the security data and release it */
|
||||
SecurityData = HvGetCell(Hive, CellData->Security);
|
||||
if (!SecurityData) ASSERT(FALSE);
|
||||
SecurityData = (PCM_KEY_SECURITY)HvGetCell(Hive, CellData->Security);
|
||||
ASSERT(SecurityData);
|
||||
HvReleaseCell(Hive, CellData->Security);
|
||||
|
||||
/* Mark the security links dirty too */
|
||||
|
@ -81,7 +81,7 @@ CmpMarkKeyDirty(IN PHHIVE Hive,
|
|||
|
||||
/* Get the list data itself, and release it */
|
||||
ListData = HvGetCell(Hive, CellData->ValueList.List);
|
||||
if (!ListData) ASSERT(FALSE);
|
||||
ASSERT(ListData);
|
||||
HvReleaseCell(Hive, CellData->ValueList.List);
|
||||
|
||||
/* Loop all values */
|
||||
|
@ -127,8 +127,8 @@ CmpFreeKeyBody(IN PHHIVE Hive,
|
|||
PCM_KEY_NODE CellData;
|
||||
|
||||
/* Get the key node */
|
||||
CellData = HvGetCell(Hive, Cell);
|
||||
if (!CellData) ASSERT(FALSE);
|
||||
CellData = (PCM_KEY_NODE)HvGetCell(Hive, Cell);
|
||||
ASSERT(CellData);
|
||||
|
||||
/* Check if we can delete the child cells */
|
||||
if (!(CellData->Flags & KEY_HIVE_EXIT))
|
||||
|
@ -169,8 +169,8 @@ CmpFreeKeyByCell(IN PHHIVE Hive,
|
|||
CmpMarkKeyDirty(Hive, Cell, TRUE);
|
||||
|
||||
/* Get the target node and release it */
|
||||
CellData = HvGetCell(Hive, Cell);
|
||||
if (!CellData) ASSERT(FALSE);
|
||||
CellData = (PCM_KEY_NODE)HvGetCell(Hive, Cell);
|
||||
ASSERT(CellData);
|
||||
HvReleaseCell(Hive, Cell);
|
||||
|
||||
/* Make sure we don't have subkeys */
|
||||
|
@ -184,8 +184,8 @@ CmpFreeKeyByCell(IN PHHIVE Hive,
|
|||
if (!Result) return STATUS_INSUFFICIENT_RESOURCES;
|
||||
|
||||
/* Get the parent node and release it */
|
||||
ParentData = HvGetCell(Hive, CellData->Parent);
|
||||
if (!ParentData) ASSERT(FALSE);
|
||||
ParentData = (PCM_KEY_NODE)HvGetCell(Hive, CellData->Parent);
|
||||
ASSERT(ParentData);
|
||||
HvReleaseCell(Hive, CellData->Parent);
|
||||
|
||||
/* Check if the parent node has no more subkeys */
|
||||
|
@ -206,14 +206,15 @@ CmpFreeKeyByCell(IN PHHIVE Hive,
|
|||
{
|
||||
/* Get the value list and release it */
|
||||
ListData = HvGetCell(Hive, CellData->ValueList.List);
|
||||
if (!ListData) ASSERT(FALSE);
|
||||
ASSERT(ListData);
|
||||
HvReleaseCell(Hive, CellData->ValueList.List);
|
||||
|
||||
/* Loop every value */
|
||||
for (i = 0; i < CellData->ValueList.Count; i++)
|
||||
{
|
||||
/* Free it */
|
||||
if (!CmpFreeValue(Hive, ListData->u.KeyList[i])) ASSERT(FALSE);
|
||||
Result = CmpFreeValue(Hive, ListData->u.KeyList[i]);
|
||||
ASSERT(Result);
|
||||
}
|
||||
|
||||
/* Free the value list */
|
||||
|
|
|
@ -25,17 +25,17 @@ CmpRemoveSecurityCellList(IN PHHIVE Hive,
|
|||
|
||||
// ASSERT( (((PCMHIVE)Hive)->HiveSecurityLockOwner == KeGetCurrentThread()) || (CmpTestRegistryLockExclusive() == TRUE) );
|
||||
|
||||
SecurityData = HvGetCell(Hive, SecurityCell);
|
||||
SecurityData = (PCM_KEY_SECURITY)HvGetCell(Hive, SecurityCell);
|
||||
if (!SecurityData) return;
|
||||
|
||||
FlinkCell = HvGetCell(Hive, SecurityData->Flink);
|
||||
FlinkCell = (PCM_KEY_SECURITY)HvGetCell(Hive, SecurityData->Flink);
|
||||
if (!FlinkCell)
|
||||
{
|
||||
HvReleaseCell(Hive, SecurityCell);
|
||||
return;
|
||||
}
|
||||
|
||||
BlinkCell = HvGetCell(Hive, SecurityData->Blink);
|
||||
BlinkCell = (PCM_KEY_SECURITY)HvGetCell(Hive, SecurityData->Blink);
|
||||
if (!BlinkCell)
|
||||
{
|
||||
HvReleaseCell(Hive, SecurityData->Flink);
|
||||
|
@ -72,7 +72,7 @@ CmpFreeSecurityDescriptor(IN PHHIVE Hive,
|
|||
|
||||
// ASSERT( (((PCMHIVE)Hive)->HiveSecurityLockOwner == KeGetCurrentThread()) || (CmpTestRegistryLockExclusive() == TRUE) );
|
||||
|
||||
CellData = HvGetCell(Hive, Cell);
|
||||
CellData = (PCM_KEY_NODE)HvGetCell(Hive, Cell);
|
||||
if (!CellData) return;
|
||||
|
||||
ASSERT(CellData->Signature == CM_KEY_NODE_SIGNATURE);
|
||||
|
@ -89,7 +89,7 @@ CmpFreeSecurityDescriptor(IN PHHIVE Hive,
|
|||
return;
|
||||
}
|
||||
|
||||
SecurityData = HvGetCell(Hive, CellData->Security);
|
||||
SecurityData = (PCM_KEY_SECURITY)HvGetCell(Hive, CellData->Security);
|
||||
if (!SecurityData)
|
||||
{
|
||||
HvReleaseCell(Hive, Cell);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue