From b36653bc1683c189e3d264f6192012334a459081 Mon Sep 17 00:00:00 2001 From: niruiyu Date: Wed, 30 Mar 2011 04:37:59 +0000 Subject: 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 --- MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c | 8 +++++--- 1 file 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); -- cgit v1.2.3