Replace ExAllocatePool by ExAllocatePoolWithTag
authorHervé Poussineau <hpoussin@reactos.org>
Wed, 24 Aug 2005 15:33:58 +0000 (15:33 +0000)
committerHervé Poussineau <hpoussin@reactos.org>
Wed, 24 Aug 2005 15:33:58 +0000 (15:33 +0000)
Fix CHECKPOINT1 definition for MSVC compiler

svn path=/trunk/; revision=17513

reactos/drivers/bus/serenum/detect.c
reactos/drivers/bus/serenum/fdo.c
reactos/drivers/bus/serenum/misc.c
reactos/drivers/bus/serenum/pdo.c
reactos/drivers/bus/serenum/serenum.h

index a2813c2..06dff73 100644 (file)
@@ -193,6 +193,7 @@ ReportDetectedDevice(
 ByeBye:
        if (Pdo)
        {
+               ASSERT(PdoDeviceExtension);
                if (PdoDeviceExtension->DeviceDescription.Buffer)
                        RtlFreeUnicodeString(&PdoDeviceExtension->DeviceDescription);
                if (PdoDeviceExtension->DeviceId.Buffer)
index b063122..03464e1 100644 (file)
@@ -124,9 +124,10 @@ SerenumFdoQueryBusRelations(
        }
        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;
 
index 7528ac1..58642fd 100644 (file)
@@ -25,7 +25,7 @@ SerenumDuplicateUnicodeString(
                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;
index d4d76b3..8bc11c6 100644 (file)
@@ -233,7 +233,7 @@ SerenumPdoPnp(
                                        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 @@ SerenumPdoPnp(
                        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
index 010652c..5a4af7e 100644 (file)
@@ -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