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/de…
==============================================================================
--- 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);
}