[ros-diffs] [tkreuzer] 52118: [NTOSKRNL] Remove useless casts to volatile ULONG. It doesn't make sense to cast something to volatile, after the pointer is already dereferenced. But we don't need this here anyway.

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Mon Jun 6 17:50:05 UTC 2011


Author: tkreuzer
Date: Mon Jun  6 17:50:05 2011
New Revision: 52118

URL: http://svn.reactos.org/svn/reactos?rev=52118&view=rev
Log:
[NTOSKRNL]
Remove useless casts to volatile ULONG. It doesn't make sense to cast something to volatile, after the pointer is already dereferenced. But we don't need this here anyway.

Modified:
    trunk/reactos/ntoskrnl/io/iomgr/volume.c

Modified: trunk/reactos/ntoskrnl/io/iomgr/volume.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/volume.c?rev=52118&r1=52117&r2=52118&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/volume.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/volume.c [iso-8859-1] Mon Jun  6 17:50:05 2011
@@ -314,7 +314,7 @@
     ULONG OldValue;
 
     Irql = KeAcquireQueuedSpinLock(Queue);
-    OldValue = ((volatile ULONG)*Ulong)++;
+    OldValue = (*Ulong)++;
     KeReleaseQueuedSpinLock(Queue, Irql);
 
     return OldValue;
@@ -332,7 +332,7 @@
     ULONG OldValue;
 
     Irql = KeAcquireQueuedSpinLock(Queue);
-    OldValue = ((volatile ULONG)*Ulong)--;
+    OldValue = (*Ulong)--;
     KeReleaseQueuedSpinLock(Queue, Irql);
 
     return OldValue;
@@ -724,7 +724,7 @@
                  * file system.
                  */
                 if (!(AllowRawMount) &&
-                    (Status != STATUS_UNRECOGNIZED_VOLUME) && 
+                    (Status != STATUS_UNRECOGNIZED_VOLUME) &&
                     (FsRtlIsTotalDeviceFailure(Status)))
                 {
                     /* Break out and give up */




More information about the Ros-diffs mailing list