[RAMDISK]
authorPierre Schweitzer <pierre@reactos.org>
Mon, 29 Dec 2014 22:55:21 +0000 (22:55 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Mon, 29 Dec 2014 22:55:21 +0000 (22:55 +0000)
Simplify & use IoCopyCurrentIrpStackLocationToNext()

svn path=/trunk/; revision=65901

reactos/drivers/storage/class/ramdisk/ramdisk.c

index 3085028..143a6f6 100644 (file)
@@ -2297,7 +2297,7 @@ NTAPI
 RamdiskPnp(IN PDEVICE_OBJECT DeviceObject,
            IN PIRP Irp)
 {
-    PIO_STACK_LOCATION IoStackLocation, NextIoStack;
+    PIO_STACK_LOCATION IoStackLocation;
     PRAMDISK_BUS_EXTENSION DeviceExtension;
     NTSTATUS Status;
     UCHAR Minor;
@@ -2429,8 +2429,7 @@ RamdiskPnp(IN PDEVICE_OBJECT DeviceObject,
             //
             // Prepare next stack to pass it down
             //
-            NextIoStack = IoGetNextIrpStackLocation(Irp);
-            RtlCopyMemory(NextIoStack, IoStackLocation, sizeof(IO_STACK_LOCATION));
+            IoCopyCurrentIrpStackLocationToNext(Irp);
 
             //
             // Initialize our notification event & our completion routine