[CMLIB] Adjust parameter types and annotations. Add diagnostic assertions.

This commit is contained in:
Hermès Bélusca-Maïto 2018-10-14 00:16:04 +02:00
parent 801b71b9bf
commit bf8a7d2db0
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
3 changed files with 10 additions and 7 deletions

View file

@ -207,7 +207,7 @@ NTAPI
CmpAddValueToList(IN PHHIVE Hive,
IN HCELL_INDEX ValueCell,
IN ULONG Index,
IN ULONG Type,
IN HSTORAGE_TYPE StorageType,
IN OUT PCHILD_LIST ChildList)
{
HCELL_INDEX ListCell;
@ -223,6 +223,8 @@ CmpAddValueToList(IN PHHIVE Hive,
ChildCount++;
if (ChildCount > 1)
{
ASSERT(ChildList->List != HCELL_NIL);
/* The cell should be dirty at this point */
ASSERT(HvIsCellDirty(Hive, ChildList->List));
@ -249,7 +251,8 @@ CmpAddValueToList(IN PHHIVE Hive,
else
{
/* This is our first child, so allocate a single cell */
ListCell = HvAllocateCell(Hive, sizeof(HCELL_INDEX), Type, HCELL_NIL);
ASSERT(ChildList->List == HCELL_NIL);
ListCell = HvAllocateCell(Hive, sizeof(HCELL_INDEX), StorageType, HCELL_NIL);
}
/* Fail if we couldn't get a cell */
@ -286,7 +289,7 @@ NTAPI
CmpSetValueDataNew(IN PHHIVE Hive,
IN PVOID Data,
IN ULONG DataSize,
IN ULONG StorageType,
IN HSTORAGE_TYPE StorageType,
IN HCELL_INDEX ValueCell,
OUT PHCELL_INDEX DataCell)
{