Commit e724d67f authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

hid: Refine initialization of UsageLength in HidP_GetUsages.

parent c86bf9dc
......@@ -278,10 +278,11 @@ NTSTATUS WINAPI HidP_GetUsages(HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USH
TRACE("(%i, %x, %i, %p, %p, %p, %p, %i)\n", ReportType, UsagePage, LinkCollection, UsageList,
UsageLength, PreparsedData, Report, ReportLength);
*UsageLength = 0;
if (data->magic != HID_MAGIC)
{
*UsageLength = 0;
return HIDP_STATUS_INVALID_PREPARSED_DATA;
}
switch(ReportType)
{
......@@ -344,11 +345,11 @@ NTSTATUS WINAPI HidP_GetUsages(HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USH
}
}
*UsageLength = uCount;
if (!found)
return HIDP_STATUS_USAGE_NOT_FOUND;
*UsageLength = uCount;
return HIDP_STATUS_SUCCESS;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment