Author: tfaber
Date: Sat May 11 15:41:22 2013
New Revision: 58996
URL:
http://svn.reactos.org/svn/reactos?rev=58996&view=rev
Log:
[HIDPARSE]
- Use pool tagging
- Avoid a cast
Modified:
trunk/reactos/drivers/hid/hidparse/hidparse.c
trunk/reactos/drivers/hid/hidparse/hidparse.h
Modified: trunk/reactos/drivers/hid/hidparse/hidparse.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/hid/hidparse/hidpa…
==============================================================================
--- trunk/reactos/drivers/hid/hidparse/hidparse.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/hid/hidparse/hidparse.c [iso-8859-1] Sat May 11 15:41:22 2013
@@ -15,7 +15,7 @@
AllocFunction(
IN ULONG ItemSize)
{
- PVOID Item = ExAllocatePool(NonPagedPool, ItemSize);
+ PVOID Item = ExAllocatePoolWithTag(NonPagedPool, ItemSize, HIDPARSE_TAG);
if (Item)
{
//
@@ -38,7 +38,7 @@
//
// free item
//
- ExFreePool(Item);
+ ExFreePoolWithTag(Item, HIDPARSE_TAG);
}
VOID
@@ -259,7 +259,7 @@
IN PCHAR Report,
IN ULONG ReportLength)
{
- return HidP_GetUsages(ReportType, HID_USAGE_PAGE_UNDEFINED, LinkCollection,
(PUSAGE)ButtonList, UsageLength, PreparsedData, Report, ReportLength);
+ return HidP_GetUsages(ReportType, HID_USAGE_PAGE_UNDEFINED, LinkCollection,
&ButtonList->Usage, UsageLength, PreparsedData, Report, ReportLength);
}
HIDAPI
Modified: trunk/reactos/drivers/hid/hidparse/hidparse.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/hid/hidparse/hidpa…
==============================================================================
--- trunk/reactos/drivers/hid/hidparse/hidparse.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/hid/hidparse/hidparse.h [iso-8859-1] Sat May 11 15:41:22 2013
@@ -8,4 +8,6 @@
#define NDEBUG
#include <debug.h>
#include "hidparser.h"
-#include <stdio.h>
+#include <stdio.h>
+
+#define HIDPARSE_TAG 'PdiH'