Author: sginsberg
Date: Sun Aug 24 15:40:27 2008
New Revision: 35613
URL:
http://svn.reactos.org/svn/reactos?rev=35613&view=rev
Log:
- [FORMATTING] Comment and formatting fixes for LocateChildDevice. No code change.
Modified:
trunk/reactos/ntoskrnl/io/pnpmgr/pnproot.c
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnproot.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnproot…
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnproot.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnproot.c [iso-8859-1] Sun Aug 24 15:40:27 2008
@@ -100,19 +100,24 @@
PPNPROOT_DEVICE Device;
UNICODE_STRING DeviceIdU, InstanceIdU;
+ /* Initialize the strings to compare */
RtlInitUnicodeString(&DeviceIdU, DeviceId);
RtlInitUnicodeString(&InstanceIdU, InstanceId);
+ /* Start looping */
LIST_FOR_EACH(Device, &DeviceExtension->DeviceListHead, PNPROOT_DEVICE,
ListEntry)
{
- if (RtlEqualUnicodeString(&DeviceIdU, &Device->DeviceID, TRUE)
- && RtlEqualUnicodeString(&InstanceIdU, &Device->InstanceID,
TRUE))
- {
+ /* See if the strings match */
+ if (RtlEqualUnicodeString(&DeviceIdU, &Device->DeviceID, TRUE)
&&
+ RtlEqualUnicodeString(&InstanceIdU, &Device->InstanceID, TRUE))
+ {
+ /* They do, so set the pointer and return success */
*ChildDevice = Device;
return STATUS_SUCCESS;
}
}
+ /* No device found */
return STATUS_NO_SUCH_DEVICE;
}