Synchronize with trunk revision 59636 (just before Alex's CreateProcess revamp).
[reactos.git] / drivers / ksfilter / ks / swenum.c
index 08d5286..f389f2d 100644 (file)
@@ -678,7 +678,7 @@ KspDoReparseForIrp(
     Length += wcslen(DeviceEntry->Instance);
 
     /* zero byte and '\\' */
-    Length += 2; 
+    Length += 2;
 
     /* allocate buffer */
     Buffer = AllocateItem(NonPagedPool, Length * sizeof(WCHAR));
@@ -1156,12 +1156,12 @@ KspBusWorkerRoutine(
     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);
 
@@ -1532,7 +1532,7 @@ KsCreateBusEnumObject(
     }
 
     BusDeviceExtension->ServicePath.Length = 0;
-    BusDeviceExtension->ServicePath.MaximumLength = Length;
+    BusDeviceExtension->ServicePath.MaximumLength = (USHORT)Length;
     BusDeviceExtension->ServicePath.Buffer = AllocateItem(NonPagedPool, Length);
 
     if (!BusDeviceExtension->ServicePath.Buffer)
@@ -2120,7 +2120,7 @@ KsServiceBusEnumPnpRequest(
 /*
     @implemented
 */
-KSDDKAPI 
+KSDDKAPI
 NTSTATUS
 NTAPI
 KsRemoveBusEnumInterface(