[MOUNTMGR] Properly look for device and break when found

Also use same pattern in MountMgrCreatePointWorker().

Addendum to a7f97cc70f.
This commit is contained in:
Serge Gautherie 2019-10-05 22:44:25 +02:00 committed by Pierre Schweitzer
parent 9f8e5d1ce0
commit 09beb7502e

View 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;
}