- DBGKD_WAIT_STATE_CHANGE64 is used in KD protocol 5, not number 6 that we use. Proto...
[reactos.git] / reactos / lib / cmlib / hivecell.c
index 25ec9a6..994ca98 100644 (file)
@@ -9,7 +9,7 @@
 #define NDEBUG
 #include <debug.h>
 
-static PHCELL __inline CMAPI
+static __inline PHCELL CMAPI
 HvpGetCellHeader(
    PHHIVE RegistryHive,
    HCELL_INDEX CellIndex)
@@ -74,11 +74,12 @@ HvGetCell(
    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;
 }
 
@@ -89,6 +90,8 @@ HvGetCellSize(IN PHHIVE Hive,
    PHCELL CellHeader;
    LONG Size;
 
+   UNREFERENCED_PARAMETER(Hive);
+
    CellHeader = (PHCELL)Address - 1;
    Size = CellHeader->Size * -1;
    Size -= sizeof(HCELL);
@@ -124,6 +127,8 @@ BOOLEAN CMAPI
 HvIsCellDirty(IN PHHIVE Hive,
               IN HCELL_INDEX Cell)
 {
+   BOOLEAN IsDirty = FALSE;
+
    /* Sanity checks */
    ASSERT(Hive->ReadOnly == FALSE);
 
@@ -132,10 +137,14 @@ HvIsCellDirty(IN PHHIVE Hive,
       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)
 {
@@ -418,7 +427,7 @@ HvReallocateCell(
     * 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)