Length += wcslen(DeviceEntry->Instance);
/* zero byte and '\\' */
- Length += 2;
+ Length += 2;
/* allocate buffer */
Buffer = AllocateItem(NonPagedPool, Length * sizeof(WCHAR));
BOOLEAN DoInvalidate = FALSE;
KIRQL OldLevel;
- /* acquire lock */
- KeAcquireSpinLock(&BusDeviceExtension->Lock, &OldLevel);
-
/* get device extension */
BusDeviceExtension = (PBUS_ENUM_DEVICE_EXTENSION)Parameter;
+ /* acquire lock */
+ KeAcquireSpinLock(&BusDeviceExtension->Lock, &OldLevel);
+
/* get current time */
KeQuerySystemTime(&Time);
}
BusDeviceExtension->ServicePath.Length = 0;
- BusDeviceExtension->ServicePath.MaximumLength = Length;
+ BusDeviceExtension->ServicePath.MaximumLength = (USHORT)Length;
BusDeviceExtension->ServicePath.Buffer = AllocateItem(NonPagedPool, Length);
if (!BusDeviceExtension->ServicePath.Buffer)
/*
@implemented
*/
-KSDDKAPI
+KSDDKAPI
NTSTATUS
NTAPI
KsRemoveBusEnumInterface(