X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fntoskrnl%2Fio%2Fpnpmgr%2Fpnpmgr.c;h=e8418893452e6c09bd65fc86e51e8250e2a8a1da;hp=f0f7a17d7c9eaf8e5d1a0375a6aaa2049ed66697;hb=1c571af17a91de0f9d1f30e4595ad7d7c8de67c1;hpb=f57f4193e5998f47873adf3053bd566196a56e4b diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index f0f7a17d7c9..e8418893452 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -1420,7 +1420,7 @@ IopActionInterrogateDeviceStack(PDEVICE_NODE DeviceNode, sizeof(ULONG)); /* Set 'UINumber' value */ - if (DeviceCapabilities.UINumber != (ULONG)-1) + if (DeviceCapabilities.UINumber != MAXULONG) { RtlInitUnicodeString(&ValueName, L"UINumber"); Status = ZwSetValueKey(InstanceKey, @@ -1893,7 +1893,7 @@ IopActionConfigureChildServices(PDEVICE_NODE DeviceNode, RtlInitUnicodeString(&ClassGUID, NULL); QueryTable[0].Name = L"Service"; - QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_REQUIRED; + QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT; QueryTable[0].EntryContext = Service; QueryTable[1].Name = L"ClassGUID"; @@ -3078,7 +3078,7 @@ IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject, case DevicePropertyAddress: /* Query the device caps */ Status = IopQueryDeviceCapabilities(DeviceNode, &DeviceCaps); - if (NT_SUCCESS(Status) && (DeviceCaps.Address != (ULONG)-1)) + if (NT_SUCCESS(Status) && (DeviceCaps.Address != MAXULONG)) { /* Return length */ *ResultLength = sizeof(ULONG); @@ -3236,7 +3236,7 @@ IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject, * always contains the enumerator name followed by \\ */ Ptr = wcschr(DeviceNode->InstancePath.Buffer, L'\\'); ASSERT(Ptr); - Length = (Ptr - DeviceNode->InstancePath.Buffer + 1) * sizeof(WCHAR); + Length = (Ptr - DeviceNode->InstancePath.Buffer) * sizeof(WCHAR); Data = DeviceNode->InstancePath.Buffer; break;