[ros-diffs] [pschweitzer] 38532: IopGetRelatedTargetDevice: Use IopGetDeviceNode instead of a "ugly triple-casting". Spotted by Alex

pschweitzer at svn.reactos.org pschweitzer at svn.reactos.org
Sat Jan 3 15:55:23 CET 2009


Author: pschweitzer
Date: Sat Jan  3 08:55:23 2009
New Revision: 38532

URL: http://svn.reactos.org/svn/reactos?rev=38532&view=rev
Log:
IopGetRelatedTargetDevice: Use IopGetDeviceNode instead of a "ugly triple-casting". Spotted by Alex

Modified:
    branches/pierre-fsd/ntoskrnl/io/iomgr/device.c

Modified: branches/pierre-fsd/ntoskrnl/io/iomgr/device.c
URL: http://svn.reactos.org/svn/reactos/branches/pierre-fsd/ntoskrnl/io/iomgr/device.c?rev=38532&r1=38531&r2=38532&view=diff
==============================================================================
--- branches/pierre-fsd/ntoskrnl/io/iomgr/device.c [iso-8859-1] (original)
+++ branches/pierre-fsd/ntoskrnl/io/iomgr/device.c [iso-8859-1] Sat Jan  3 08:55:23 2009
@@ -586,13 +586,13 @@
         ASSERT(DeviceRelations->Count == 1);
 
         /* We finally get the device node */
-        *DeviceNode = ((PEXTENDED_DEVOBJ_EXTENSION)DeviceRelations->Objects[0]->DeviceObjectExtension)->DeviceNode;
+        *DeviceNode = IopGetDeviceNode(DeviceRelations->Objects[0]);
         if (!*DeviceNode)
         {
             Status = STATUS_NO_SUCH_DEVICE;
         }
 
-        /* Free the DEVICE_RELATIONS structure, it's not needed it anymore */
+        /* Free the DEVICE_RELATIONS structure, it's not needed anymore */
         ExFreePool(DeviceRelations);
     }
 



More information about the Ros-diffs mailing list