Author: tfaber
Date: Wed Apr 5 14:00:03 2017
New Revision: 74277
URL:
http://svn.reactos.org/svn/reactos?rev=74277&view=rev
Log:
[NTOS:IO]
- Remove broken casts
Modified:
trunk/reactos/ntoskrnl/io/iomgr/irp.c
trunk/reactos/ntoskrnl/io/iomgr/rawfs.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/irp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/irp.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/irp.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/irp.c [iso-8859-1] Wed Apr 5 14:00:03 2017
@@ -1050,7 +1050,7 @@
Irp->Cancel = TRUE;
/* Clear the cancel routine and get the old one */
- CancelRoutine = (PVOID)IoSetCancelRoutine(Irp, NULL);
+ CancelRoutine = IoSetCancelRoutine(Irp, NULL);
if (CancelRoutine)
{
/* We had a routine, make sure the IRP isn't completed */
Modified: trunk/reactos/ntoskrnl/io/iomgr/rawfs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/rawfs.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/rawfs.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/rawfs.c [iso-8859-1] Wed Apr 5 14:00:03 2017
@@ -1053,9 +1053,10 @@
NTSTATUS
NTAPI
-RawDispatch(IN PVOLUME_DEVICE_OBJECT DeviceObject,
+RawDispatch(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
+ PVOLUME_DEVICE_OBJECT VolumeDeviceObject = (PVOLUME_DEVICE_OBJECT)DeviceObject;
NTSTATUS Status = STATUS_INVALID_DEVICE_REQUEST;
PIO_STACK_LOCATION IoStackLocation;
PVCB Vcb;
@@ -1067,7 +1068,7 @@
IoStackLocation = IoGetCurrentIrpStackLocation(Irp);
/* Differentiate between Volume DO and FS DO */
- if ((((PDEVICE_OBJECT)DeviceObject)->Size == sizeof(DEVICE_OBJECT)) &&
+ if ((DeviceObject->Size == sizeof(DEVICE_OBJECT)) &&
!((IoStackLocation->MajorFunction == IRP_MJ_FILE_SYSTEM_CONTROL) &&
(IoStackLocation->MinorFunction == IRP_MN_MOUNT_VOLUME)))
{
@@ -1093,7 +1094,7 @@
/* Otherwise, get our VCB and start handling the IRP */
FsRtlEnterFileSystem();
- Vcb = &DeviceObject->Vcb;
+ Vcb = &VolumeDeviceObject->Vcb;
/* Check what kind of IRP this is */
switch (IoStackLocation->MajorFunction)
@@ -1252,7 +1253,7 @@
DriverObject->MajorFunction[IRP_MJ_SET_INFORMATION] =
DriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] =
DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] =
- DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] =
(PDRIVER_DISPATCH)RawDispatch;
+ DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = RawDispatch;
/* Shutdown and unload */
DriverObject->MajorFunction[IRP_MJ_SHUTDOWN] = RawShutdown;