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 PUCHAR BufferEnd
) )
{ {
ULONG_PTR Current;
PUSB_INTERFACE_DESCRIPTOR CurrentDescriptor = InterfaceDescriptor; PUSB_INTERFACE_DESCRIPTOR CurrentDescriptor = InterfaceDescriptor;
DWORD Length = CurrentDescriptor->bLength; DWORD Length = CurrentDescriptor->bLength;
// USB_ENDPOINT_DESCRIPTOR_TYPE // USB_ENDPOINT_DESCRIPTOR_TYPE
if (CurrentDescriptor->bDescriptorType == USB_INTERFACE_DESCRIPTOR_TYPE) if (CurrentDescriptor->bDescriptorType == USB_INTERFACE_DESCRIPTOR_TYPE)
{ {
for (; for (Current = (ULONG_PTR)CurrentDescriptor;
(PUCHAR)CurrentDescriptor < BufferEnd; Current < (ULONG_PTR)BufferEnd;
(PVOID)CurrentDescriptor += CurrentDescriptor->bLength) Current += CurrentDescriptor->bLength)
CurrentDescriptor = (PUSB_INTERFACE_DESCRIPTOR)Current;
Length += CurrentDescriptor->bLength; Length += CurrentDescriptor->bLength;
} }