[NTOSKRNL]

- Make MSVC analyzer happy by initializing the event before calling IoBuildDeviceIoControlRequest. Patch by Ivan Rodionov (overclocker at list dot ru).
CORE-7328 #resolve #comment Committed, thanks.

svn path=/trunk/; revision=59352
This commit is contained in:
Thomas Faber 2013-06-29 05:40:09 +00:00
parent 3b4a05175b
commit 0dee0427aa

View file

@ -1777,6 +1777,7 @@ IoGetBootDiskInformation(IN OUT PBOOTDISK_INFORMATION BootDiskInformation,
}
/* Prepare for getting disk geometry */
KeInitializeEvent(&Event, NotificationEvent, FALSE);
Irp = IoBuildDeviceIoControlRequest(IOCTL_DISK_GET_DRIVE_GEOMETRY,
DeviceObject,
NULL,
@ -1793,7 +1794,6 @@ IoGetBootDiskInformation(IN OUT PBOOTDISK_INFORMATION BootDiskInformation,
}
/* Then, call the drive, and wait for it if needed */
KeInitializeEvent(&Event, NotificationEvent, FALSE);
Status = IoCallDriver(DeviceObject, Irp);
if (Status == STATUS_PENDING)
{
@ -1886,6 +1886,7 @@ IoGetBootDiskInformation(IN OUT PBOOTDISK_INFORMATION BootDiskInformation,
}
/* And call the drive to get information about partition */
KeInitializeEvent(&Event, NotificationEvent, FALSE);
Irp = IoBuildDeviceIoControlRequest(IOCTL_DISK_GET_PARTITION_INFO_EX,
DeviceObject,
NULL,
@ -1903,7 +1904,6 @@ IoGetBootDiskInformation(IN OUT PBOOTDISK_INFORMATION BootDiskInformation,
}
/* Call & wait if needed */
KeInitializeEvent(&Event, NotificationEvent, FALSE);
Status = IoCallDriver(DeviceObject, Irp);
if (Status == STATUS_PENDING)
{
@ -1957,6 +1957,7 @@ IoGetBootDiskInformation(IN OUT PBOOTDISK_INFORMATION BootDiskInformation,
}
/* And call the drive to get information about partition */
KeInitializeEvent(&Event, NotificationEvent, FALSE);
Irp = IoBuildDeviceIoControlRequest(IOCTL_DISK_GET_PARTITION_INFO_EX,
DeviceObject,
NULL,
@ -1974,7 +1975,6 @@ IoGetBootDiskInformation(IN OUT PBOOTDISK_INFORMATION BootDiskInformation,
}
/* Call & wait if needed */
KeInitializeEvent(&Event, NotificationEvent, FALSE);
Status = IoCallDriver(DeviceObject, Irp);
if (Status == STATUS_PENDING)
{