[ros-diffs] [ion] 17084: - DeviceExtension should be NULL if the caller didn't specify any size for one.

ion at svn.reactos.com ion at svn.reactos.com
Fri Aug 5 23:17:04 CEST 2005


- DeviceExtension should be NULL if the caller didn't specify any size
for one.
Modified: trunk/reactos/ntoskrnl/io/device.c
  _____  

Modified: trunk/reactos/ntoskrnl/io/device.c
--- trunk/reactos/ntoskrnl/io/device.c	2005-08-05 21:05:03 UTC (rev
17083)
+++ trunk/reactos/ntoskrnl/io/device.c	2005-08-05 21:16:51 UTC (rev
17084)
@@ -503,7 +503,9 @@

     /* Set Device Object Data */
     CreatedDeviceObject->DeviceType = DeviceType;
     CreatedDeviceObject->Characteristics = DeviceCharacteristics;
-    CreatedDeviceObject->DeviceExtension = CreatedDeviceObject + 1;
+    CreatedDeviceObject->DeviceExtension = DeviceExtensionSize ?
+                                           CreatedDeviceObject + 1 :
+                                           NULL;
     CreatedDeviceObject->StackSize = 1;
     CreatedDeviceObject->AlignmentRequirement = 1; /* FIXME */
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050805/999fe938/attachment.html


More information about the Ros-diffs mailing list