[NTOS:CC] Use UNIMPLEMENTED_ONCE instead of custom code
authorSerge Gautherie <reactos-git_serge_171003@gautherie.fr>
Thu, 22 Feb 2018 14:31:04 +0000 (15:31 +0100)
committerMark Jansen <mark.jansen@reactos.org>
Sat, 7 Apr 2018 10:00:10 +0000 (12:00 +0200)
- Rewrite e319f85e67b1d057fb1c0d0449a6756fa0d459ba.

ntoskrnl/cc/cacheman.c

index a2f9a9b..8ccd6a7 100644 (file)
@@ -165,7 +165,6 @@ CcScheduleReadAhead (
     LARGE_INTEGER NewOffset;
     PROS_SHARED_CACHE_MAP SharedCacheMap;
     PPRIVATE_CACHE_MAP PrivateCacheMap;
-    static ULONG Warn;
 
     SharedCacheMap = FileObject->SectionObjectPointer->SharedCacheMap;
     PrivateCacheMap = FileObject->PrivateCacheMap;
@@ -215,7 +214,7 @@ CcScheduleReadAhead (
         {
             /* FIXME: handle the other cases */
             KeReleaseSpinLock(&PrivateCacheMap->ReadAheadSpinLock, OldIrql);
-               if (!Warn++) UNIMPLEMENTED;
+            UNIMPLEMENTED_ONCE;
             return;
         }
     }