[NTOS:CM]: Simplify code by using suitable assertion macro.
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Mon, 19 Jun 2017 23:18:42 +0000 (23:18 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Mon, 19 Jun 2017 23:18:42 +0000 (23:18 +0000)
svn path=/trunk/; revision=75146

reactos/ntoskrnl/config/cmdelay.c

index d9c90df..e0c487d 100644 (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 */