VOID
NTAPI
+INIT_FUNCTION
CmpInitializeCache(VOID)
{
ULONG Length, i;
for (i = 0;i < CmpHashTableSize; i++)
{
/* Setup the pushlock */
- ExInitializePushLock((PULONG_PTR)&CmpCacheTable[i].Lock);
+ ExInitializePushLock(&CmpCacheTable[i].Lock);
}
/* Calculate length for the name cache */
for (i = 0;i < CmpHashTableSize; i++)
{
/* Setup the pushlock */
- ExInitializePushLock((PULONG_PTR)&CmpNameCacheTable[i].Lock);
+ ExInitializePushLock(&CmpNameCacheTable[i].Lock);
}
/* Setup the delayed close table */
ULONG i;
BOOLEAN IsCompressed = TRUE, Found = FALSE;
PCM_NAME_HASH HashEntry;
- ULONG Length, NcbSize;
+ ULONG NcbSize;
+ USHORT Length;
/* Loop the name */
p = NodeName->Buffer;
CmpCleanUpSubKeyInfo(IN PCM_KEY_CONTROL_BLOCK Kcb)
{
PCM_KEY_NODE KeyNode;
-
+
/* Sanity check */
ASSERT((CmpIsKcbLockedExclusive(Kcb) == TRUE) ||
(CmpTestRegistryLockExclusive() == TRUE));
/* Kill it */
CmpFree(Kcb->IndexHint, 0);
}
-
+
/* Remove subkey flags */
Kcb->ExtFlags &= ~(CM_KCB_NO_SUBKEY | CM_KCB_SUBKEY_ONE | CM_KCB_SUBKEY_HINT);
}
/* Get the ref count and update it */
OldRefCount = *(PLONG)&Kcb->RefCount;
NewRefCount = OldRefCount - 1;
-
+
/* Check if we still have references */
if ((NewRefCount & 0xFFFF) > 0)
{
return;
}
}
-
+
/* Save the key */
ConvKey = Kcb->ConvKey;
CmpConstructName(IN PCM_KEY_CONTROL_BLOCK Kcb)
{
PUNICODE_STRING KeyName;
- ULONG NameLength, i;
+ ULONG i;
+ USHORT NameLength;
PCM_KEY_CONTROL_BLOCK MyKcb;
PCM_KEY_NODE KeyNode;
BOOLEAN DeletedKey = FALSE;
if (Flags & CMP_ENLIST_KCB_LOCKED_SHARED)
{
/* It's shared, so release the KCB shared lock */
- CmpReleaseKcbLock(KeyBody->KeyControlBlock);
+ CmpReleaseKcbLock(KeyBody->KeyControlBlock);
ASSERT(!(Flags & CMP_ENLIST_KCB_LOCKED_EXCLUSIVE));
- }
+ }
/* Check if we need to lock the KCB */
if (!(Flags & CMP_ENLIST_KCB_LOCKED_EXCLUSIVE))
{
/* Release the lock */
CmpReleaseKcbLock(KeyBody->KeyControlBlock);
- }
+ }
}
VOID
ASSERT(KeyBody->NotifyBlock == NULL);
/* Release the reference we took */
- ObDereferenceObjectDeferDelete(KeyBody);
+ ObDereferenceObjectDeferDelete(KeyBody);
continue;
}
}