fixed warning

svn path=/trunk/; revision=14659
This commit is contained in:
Thomas Bluemel 2005-04-17 20:46:36 +00:00
parent 30e7e912c2
commit a9920ccd9d

View file

@ -351,15 +351,17 @@ USBD_GetInterfaceLength(
PUCHAR BufferEnd
)
{
ULONG_PTR Current;
PUSB_INTERFACE_DESCRIPTOR CurrentDescriptor = InterfaceDescriptor;
DWORD Length = CurrentDescriptor->bLength;
// USB_ENDPOINT_DESCRIPTOR_TYPE
if (CurrentDescriptor->bDescriptorType == USB_INTERFACE_DESCRIPTOR_TYPE)
{
for (;
(PUCHAR)CurrentDescriptor < BufferEnd;
(PVOID)CurrentDescriptor += CurrentDescriptor->bLength)
for (Current = (ULONG_PTR)CurrentDescriptor;
Current < (ULONG_PTR)BufferEnd;
Current += CurrentDescriptor->bLength)
CurrentDescriptor = (PUSB_INTERFACE_DESCRIPTOR)Current;
Length += CurrentDescriptor->bLength;
}