summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/DevicePathDxe
diff options
context:
space:
mode:
authorniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2011-03-30 04:37:59 +0000
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2011-03-30 04:37:59 +0000
commitb36653bc1683c189e3d264f6192012334a459081 (patch)
treeb0b6e7f4e4076900b00df448346cdef75f82d2fd /MdeModulePkg/Universal/DevicePathDxe
parent320587dac344e81a88c07d0222fe28ef53b12566 (diff)
downloadedk2-b36653bc1683c189e3d264f6192012334a459081.tar.gz
edk2-b36653bc1683c189e3d264f6192012334a459081.tar.bz2
edk2-b36653bc1683c189e3d264f6192012334a459081.zip
Fix ICC compilation failure. No functionality impact.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11456 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/DevicePathDxe')
-rw-r--r--MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c b/MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c
index 00f44f803c..3236291520 100644
--- a/MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c
+++ b/MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c
@@ -1153,6 +1153,7 @@ DevPathFromTextAcpiAdr (
CHAR16 *DisplayDeviceStr;
ACPI_ADR_DEVICE_PATH *AcpiAdr;
UINTN Index;
+ UINTN Length;
AcpiAdr = (ACPI_ADR_DEVICE_PATH *) CreateDeviceNode (
ACPI_DEVICE_PATH,
@@ -1167,13 +1168,14 @@ DevPathFromTextAcpiAdr (
break;
}
if (Index > 0) {
+ Length = DevicePathNodeLength (AcpiAdr);
AcpiAdr = ReallocatePool (
- DevicePathNodeLength (AcpiAdr),
- DevicePathNodeLength (AcpiAdr) + sizeof (UINT32),
+ Length,
+ Length + sizeof (UINT32),
AcpiAdr
);
ASSERT (AcpiAdr != NULL);
- SetDevicePathNodeLength (AcpiAdr, DevicePathNodeLength (AcpiAdr) + sizeof (UINT32));
+ SetDevicePathNodeLength (AcpiAdr, Length + sizeof (UINT32));
}
(&AcpiAdr->ADR)[Index] = (UINT32) Strtoi (DisplayDeviceStr);