From f88b7fd42e95caabc4ee85905b7712458df02746 Mon Sep 17 00:00:00 2001 From: gikidy Date: Thu, 18 Jun 2009 06:40:20 +0000 Subject: Fix wrong variable used that may overwrite correct data with incorrect one. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8593 6f19259b-4bc3-4df7-8a09-765794883524 --- IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'IntelFrameworkModulePkg/Bus') diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c index 687e007b5a..c8cd57a514 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c @@ -1104,7 +1104,7 @@ ConstructAcpiResourceRequestor ( Ptr->AddrLen = IoNode->Length; Ptr->AddrRangeMax = IoNode->Alignment; - Ptr = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *) ((UINT8 *) Ptr + sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR)); + Ptr++; } // // Deal with mem32 aperture @@ -1127,7 +1127,7 @@ ConstructAcpiResourceRequestor ( Ptr->AddrLen = Mem32Node->Length; Ptr->AddrRangeMax = Mem32Node->Alignment; - Ptr = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *) ((UINT8 *) Ptr + sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR)); + Ptr++; } // @@ -1151,7 +1151,7 @@ ConstructAcpiResourceRequestor ( Ptr->AddrLen = PMem32Node->Length; Ptr->AddrRangeMax = PMem32Node->Alignment; - Ptr = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *) ((UINT8 *) Ptr + sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR)); + Ptr++; } // // Deal with mem64 aperture @@ -1174,7 +1174,7 @@ ConstructAcpiResourceRequestor ( Ptr->AddrLen = Mem64Node->Length; Ptr->AddrRangeMax = Mem64Node->Alignment; - Ptr = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *) ((UINT8 *) Ptr + sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR)); + Ptr++; } // // Deal with Pmem64 aperture @@ -1197,13 +1197,13 @@ ConstructAcpiResourceRequestor ( Ptr->AddrLen = PMem64Node->Length; Ptr->AddrRangeMax = PMem64Node->Alignment; - Ptr = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *) ((UINT8 *) Ptr + sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR)); + Ptr++; } // // put the checksum // - PtrEnd = (EFI_ACPI_END_TAG_DESCRIPTOR *) ((UINT8 *) Ptr); + PtrEnd = (EFI_ACPI_END_TAG_DESCRIPTOR *) Ptr; PtrEnd->Desc = ACPI_END_TAG_DESCRIPTOR; PtrEnd->Checksum = 0; @@ -1223,7 +1223,7 @@ ConstructAcpiResourceRequestor ( Ptr = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *) (Configuration); Ptr->Desc = ACPI_ADDRESS_SPACE_DESCRIPTOR; - PtrEnd = (EFI_ACPI_END_TAG_DESCRIPTOR *) (Configuration + sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR)); + PtrEnd = (EFI_ACPI_END_TAG_DESCRIPTOR *) (Ptr + 1); PtrEnd->Desc = ACPI_END_TAG_DESCRIPTOR; PtrEnd->Checksum = 0; } -- cgit v1.2.3