[NTOS:CM]: Simplify code by using suitable assertion macro.

svn path=/trunk/; revision=75146
This commit is contained in:
Hermès Bélusca-Maïto 2017-06-19 23:18:42 +00:00
parent cf62382937
commit 2716a86ca7

View file

@ -356,8 +356,7 @@ CmpAddToDelayedClose(IN PCM_KEY_CONTROL_BLOCK Kcb,
PAGED_CODE();
/* Sanity check */
ASSERT((CmpIsKcbLockedExclusive(Kcb) == TRUE) ||
(CmpTestRegistryLockExclusive() == TRUE));
CMP_ASSERT_KCB_LOCK(Kcb);
/* Make sure it's valid */
if (Kcb->DelayedCloseIndex != CmpDelayedCloseSize) ASSERT(FALSE);
@ -430,8 +429,7 @@ CmpRemoveFromDelayedClose(IN PCM_KEY_CONTROL_BLOCK Kcb)
PAGED_CODE();
/* Sanity checks */
ASSERT((CmpIsKcbLockedExclusive(Kcb) == TRUE) ||
(CmpTestRegistryLockExclusive() == TRUE));
CMP_ASSERT_KCB_LOCK(Kcb);
if (Kcb->DelayedCloseIndex == CmpDelayedCloseSize) ASSERT(FALSE);
/* Get the entry and lock the table */