#define NDEBUG
#include <debug.h>
-static PHCELL __inline CMAPI
+static __inline PHCELL CMAPI
HvpGetCellHeader(
PHHIVE RegistryHive,
HCELL_INDEX CellIndex)
return (PVOID)(HvpGetCellHeader(RegistryHive, CellIndex) + 1);
}
-static LONG __inline CMAPI
+static __inline LONG CMAPI
HvpGetCellFullSize(
PHHIVE RegistryHive,
PVOID Cell)
{
+ UNREFERENCED_PARAMETER(RegistryHive);
return ((PHCELL)Cell - 1)->Size;
}
PHCELL CellHeader;
LONG Size;
+ UNREFERENCED_PARAMETER(Hive);
+
CellHeader = (PHCELL)Address - 1;
Size = CellHeader->Size * -1;
Size -= sizeof(HCELL);
HvIsCellDirty(IN PHHIVE Hive,
IN HCELL_INDEX Cell)
{
+ BOOLEAN IsDirty = FALSE;
+
/* Sanity checks */
ASSERT(Hive->ReadOnly == FALSE);
return TRUE;
/* Check if the dirty bit is set */
- return RtlCheckBit(&Hive->DirtyVector, Cell / HV_BLOCK_SIZE);
+ if (RtlCheckBit(&Hive->DirtyVector, Cell / HV_BLOCK_SIZE))
+ IsDirty = TRUE;
+
+ /* Return result as boolean*/
+ return IsDirty;
}
-static ULONG __inline CMAPI
+static __inline ULONG CMAPI
HvpComputeFreeListIndex(
ULONG Size)
{
* FIXME: Merge with adjacent free cell if possible.
* FIXME: Implement shrinking.
*/
- if (Size > OldCellSize)
+ if (Size > (ULONG)OldCellSize)
{
NewCellIndex = HvAllocateCell(RegistryHive, Size, Storage, HCELL_NIL);
if (NewCellIndex == HCELL_NIL)