From bfe03264cb673923eef847a0286860b1184a462e Mon Sep 17 00:00:00 2001 From: jljusten Date: Thu, 22 May 2008 23:46:47 +0000 Subject: [PATCH] edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c: Merge from edk2\MdePkg\Library\PeiMemoryAllocationLib\MemoryAllocationLib.c to achieve better support for additional compilers. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5280 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Library/PeiMemoryAllocationLib/MemoryAllocationLib.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c index b85575bfdd..52f4a0fb79 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c @@ -43,14 +43,12 @@ InternalAllocatePages ( { EFI_STATUS Status; EFI_PHYSICAL_ADDRESS Memory; - EFI_PEI_SERVICES **PeiServices; if (Pages == 0) { return NULL; } - PeiServices = GetPeiServicesTablePointer (); - Status = ((*PeiServices)->AllocatePages) (PeiServices, MemoryType, Pages, &Memory); + Status = PeiServicesAllocatePages (MemoryType, Pages, &Memory); if (EFI_ERROR (Status)) { Memory = 0; } @@ -352,12 +350,9 @@ GlueAllocatePool ( ) { EFI_STATUS Status; - EFI_PEI_SERVICES **PeiServices; VOID *Buffer; - PeiServices = GetPeiServicesTablePointer (); - - Status = ((*PeiServices)->AllocatePool) (PeiServices, AllocationSize, &Buffer); + Status = PeiServicesAllocatePool (AllocationSize, &Buffer); if (EFI_ERROR (Status)) { Buffer = NULL; }