[MOUNTMGR] Properly look for device and break when found
authorSerge Gautherie <reactos-git_serge_171003@gautherie.fr>
Sat, 5 Oct 2019 20:44:25 +0000 (22:44 +0200)
committerPierre Schweitzer <pierre@reactos.org>
Sun, 6 Oct 2019 08:58:30 +0000 (10:58 +0200)
Also use same pattern in MountMgrCreatePointWorker().

Addendum to a7f97cc70f62f6805e71b28eba51f52b942d22b4.

drivers/filters/mountmgr/point.c

index 373ade7..2479ff4 100644 (file)
@@ -60,7 +60,7 @@ MountMgrCreatePointWorker(IN PDEVICE_EXTENSION DeviceExtension,
     {
         DeviceInformation = CONTAINING_RECORD(DeviceEntry, DEVICE_INFORMATION, DeviceListEntry);
 
-        if (RtlCompareUnicodeString(&TargetDeviceName, &(DeviceInformation->DeviceName), TRUE) == 0)
+        if (RtlEqualUnicodeString(&TargetDeviceName, &(DeviceInformation->DeviceName), TRUE))
         {
             break;
         }
@@ -462,7 +462,7 @@ QueryPointsFromSymbolicLinkName(IN PDEVICE_EXTENSION DeviceExtension,
         {
             DeviceInformation = CONTAINING_RECORD(DeviceEntry, DEVICE_INFORMATION, DeviceListEntry);
 
-            if (RtlEqualUnicodeString(&DeviceName, &(DeviceInformation->DeviceName), TRUE) == 0)
+            if (RtlEqualUnicodeString(&DeviceName, &(DeviceInformation->DeviceName), TRUE))
             {
                 break;
             }