minor optimization fix for single linked lists
Modified: trunk/reactos/ntoskrnl/ex/list.c
Modified: trunk/reactos/ntoskrnl/ob/handle.c

Modified: trunk/reactos/ntoskrnl/ex/list.c
--- trunk/reactos/ntoskrnl/ex/list.c	2005-03-25 22:40:56 UTC (rev 14321)
+++ trunk/reactos/ntoskrnl/ex/list.c	2005-03-25 22:53:57 UTC (rev 14322)
@@ -449,7 +449,7 @@
   
   do
   {
-    oldslh = *ListHead;
+    oldslh = *(volatile SLIST_HEADER *)ListHead;
     le = oldslh.Next.Next;
     if(le == NULL)
     {
@@ -481,7 +481,7 @@
   
   do
   {
-    oldslh = *ListHead;
+    oldslh = *(volatile SLIST_HEADER *)ListHead;
     newslh.Depth = oldslh.Depth + 1;
     newslh.Sequence = oldslh.Sequence + 1;
     ListEntry->Next = oldslh.Next.Next;

Modified: trunk/reactos/ntoskrnl/ob/handle.c
--- trunk/reactos/ntoskrnl/ob/handle.c	2005-03-25 22:40:56 UTC (rev 14321)
+++ trunk/reactos/ntoskrnl/ob/handle.c	2005-03-25 22:53:57 UTC (rev 14322)
@@ -779,6 +779,9 @@
                                  HandleEntry);
 
         KeLeaveCriticalRegion();
+        
+        DPRINT1("GrantedAccess: 0x%x, ~GrantedAccess: 0x%x, DesiredAccess: 0x%x, denied: 0x%x\n", GrantedAccess, ~GrantedAccess, DesiredAccess, ~GrantedAccess & DesiredAccess);
+        KEBUGCHECK(0);
 
         return(STATUS_ACCESS_DENIED);
      }