Author: fireball
Date: Sun Sep 21 06:34:04 2008
New Revision: 36367
URL:
http://svn.reactos.org/svn/reactos?rev=36367&view=rev
Log:
- FileOffset is 32bit long, not 64bit, so no reason in additional casting.
- Fix a ULONG -> BOOLEAN conversion warning.
Modified:
trunk/reactos/lib/cmlib/hivecell.c
trunk/reactos/lib/cmlib/hivewrt.c
Modified: trunk/reactos/lib/cmlib/hivecell.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/hivecell.c?rev=3…
==============================================================================
--- trunk/reactos/lib/cmlib/hivecell.c [iso-8859-1] (original)
+++ trunk/reactos/lib/cmlib/hivecell.c [iso-8859-1] Sun Sep 21 06:34:04 2008
@@ -124,6 +124,8 @@
HvIsCellDirty(IN PHHIVE Hive,
IN HCELL_INDEX Cell)
{
+ BOOLEAN IsDirty = FALSE;
+
/* Sanity checks */
ASSERT(Hive->ReadOnly == FALSE);
@@ -132,7 +134,11 @@
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
Modified: trunk/reactos/lib/cmlib/hivewrt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/hivewrt.c?rev=36…
==============================================================================
--- trunk/reactos/lib/cmlib/hivewrt.c [iso-8859-1] (original)
+++ trunk/reactos/lib/cmlib/hivewrt.c [iso-8859-1] Sun Sep 21 06:34:04 2008
@@ -189,7 +189,7 @@
}
BlockPtr =
(PVOID)RegistryHive->Storage[Stable].BlockList[BlockIndex].BlockAddress;
- FileOffset = (ULONGLONG)(BlockIndex + 1) * (ULONGLONG)HV_BLOCK_SIZE;
+ FileOffset = (BlockIndex + 1) * HV_BLOCK_SIZE;
/* Write hive block */
Success = RegistryHive->FileWrite(RegistryHive, HFILE_TYPE_PRIMARY,