Replace ExAllocatePool by ExAllocatePoolWithTag
Fix CHECKPOINT1 definition for MSVC compiler
Modified: trunk/reactos/drivers/bus/serenum/detect.c
Modified: trunk/reactos/drivers/bus/serenum/fdo.c
Modified: trunk/reactos/drivers/bus/serenum/misc.c
Modified: trunk/reactos/drivers/bus/serenum/pdo.c
Modified: trunk/reactos/drivers/bus/serenum/serenum.h

Modified: trunk/reactos/drivers/bus/serenum/detect.c
--- trunk/reactos/drivers/bus/serenum/detect.c	2005-08-24 14:15:54 UTC (rev 17512)
+++ trunk/reactos/drivers/bus/serenum/detect.c	2005-08-24 15:33:58 UTC (rev 17513)
@@ -193,6 +193,7 @@
 ByeBye:
 	if (Pdo)
 	{
+		ASSERT(PdoDeviceExtension);
 		if (PdoDeviceExtension->DeviceDescription.Buffer)
 			RtlFreeUnicodeString(&PdoDeviceExtension->DeviceDescription);
 		if (PdoDeviceExtension->DeviceId.Buffer)

Modified: trunk/reactos/drivers/bus/serenum/fdo.c
--- trunk/reactos/drivers/bus/serenum/fdo.c	2005-08-24 14:15:54 UTC (rev 17512)
+++ trunk/reactos/drivers/bus/serenum/fdo.c	2005-08-24 15:33:58 UTC (rev 17513)
@@ -124,9 +124,10 @@
 	}
 	NumPDO = (DeviceExtension->AttachedPdo != NULL ? 1 : 0);
 
-	DeviceRelations = (PDEVICE_RELATIONS)ExAllocatePool(
+	DeviceRelations = (PDEVICE_RELATIONS)ExAllocatePoolWithTag(
 		PagedPool,
-		sizeof(DEVICE_RELATIONS) + sizeof(PDEVICE_OBJECT) * (NumPDO - 1));
+		sizeof(DEVICE_RELATIONS) + sizeof(PDEVICE_OBJECT) * (NumPDO - 1),
+		SERENUM_TAG);
 	if (!DeviceRelations)
 		return STATUS_INSUFFICIENT_RESOURCES;
 

Modified: trunk/reactos/drivers/bus/serenum/misc.c
--- trunk/reactos/drivers/bus/serenum/misc.c	2005-08-24 14:15:54 UTC (rev 17512)
+++ trunk/reactos/drivers/bus/serenum/misc.c	2005-08-24 15:33:58 UTC (rev 17513)
@@ -25,7 +25,7 @@
 		return STATUS_SUCCESS;
 	}
 
-	Destination->Buffer = ExAllocatePool(PoolType, Source->MaximumLength);
+	Destination->Buffer = ExAllocatePoolWithTag(PoolType, Source->MaximumLength, SERENUM_TAG);
 	if (Destination->Buffer == NULL)
 	{
 		return STATUS_INSUFFICIENT_RESOURCES;

Modified: trunk/reactos/drivers/bus/serenum/pdo.c
--- trunk/reactos/drivers/bus/serenum/pdo.c	2005-08-24 14:15:54 UTC (rev 17512)
+++ trunk/reactos/drivers/bus/serenum/pdo.c	2005-08-24 15:33:58 UTC (rev 17513)
@@ -233,7 +233,7 @@
 					DPRINT("Serenum: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_TEXT / DeviceTextDescription\n");
 
 					Source = &((PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->DeviceDescription;
-					Description = ExAllocatePool(PagedPool, Source->Length + sizeof(WCHAR));
+					Description = ExAllocatePoolWithTag(PagedPool, Source->Length + sizeof(WCHAR), SERENUM_TAG);
 					if (!Description)
 						Status = STATUS_INSUFFICIENT_RESOURCES;
 					else
@@ -277,7 +277,7 @@
 			PPNP_BUS_INFORMATION BusInfo;
 			DPRINT("Serenum: IRP_MJ_PNP / IRP_MN_QUERY_BUS_INFORMATION\n");
 
-			BusInfo = (PPNP_BUS_INFORMATION)ExAllocatePool(PagedPool, sizeof(PNP_BUS_INFORMATION));
+			BusInfo = (PPNP_BUS_INFORMATION)ExAllocatePoolWithTag(PagedPool, sizeof(PNP_BUS_INFORMATION), SERENUM_TAG);
 			if (!BusInfo)
 				Status = STATUS_INSUFFICIENT_RESOURCES;
 			else

Modified: trunk/reactos/drivers/bus/serenum/serenum.h
--- trunk/reactos/drivers/bus/serenum/serenum.h	2005-08-24 14:15:54 UTC (rev 17512)
+++ trunk/reactos/drivers/bus/serenum/serenum.h	2005-08-24 15:33:58 UTC (rev 17513)
@@ -17,7 +17,7 @@
   #define STDCALL
 
   #define DPRINT1 DbgPrint("(%s:%d) ", __FILE__, __LINE__), DbgPrint
-  #define CHECKPOINT1 DbgPrint("(%s:%d)\n")
+  #define CHECKPOINT1 DbgPrint("(%s:%d)\n", __FILE__, __LINE__)
   #define DPRINT DPRINT1
   #define CHECKPOINT CHECKPOINT1
 #else