mirror of https://github.com/acidanthera/audk.git
StdLib/LibC/StdLib/Malloc.c: Revert cast removal to fix GCC build breakage.
The cast to (void**) is needed for the last parameter of the AllocatePool call in malloc(). This is because type CPOOL_HEAD** is not automatically promoted to void**, as required by AllocatePool(). This was originally addressed in SVN revision 15474 but removed again in 15664. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Daryl McDaniel <daryl.mcdaniel@intel.com> Reviewed by: Stefan Kaeser <stefankaeser@hotmail.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15677 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
a33a2f6221
commit
69c87efff4
|
@ -84,8 +84,8 @@ void *
|
|||
malloc(size_t Size)
|
||||
{
|
||||
CPOOL_HEAD *Head;
|
||||
void *RetVal;
|
||||
EFI_STATUS Status;
|
||||
void *RetVal;
|
||||
EFI_STATUS Status;
|
||||
UINTN NodeSize;
|
||||
|
||||
if( Size == 0) {
|
||||
|
@ -98,7 +98,7 @@ malloc(size_t Size)
|
|||
|
||||
DEBUG((DEBUG_POOL, "malloc(%d): NodeSz: %d", Size, NodeSize));
|
||||
|
||||
Status = gBS->AllocatePool( EfiLoaderData, NodeSize, &Head);
|
||||
Status = gBS->AllocatePool( EfiLoaderData, NodeSize, (void**)&Head);
|
||||
if( Status != EFI_SUCCESS) {
|
||||
RetVal = NULL;
|
||||
errno = ENOMEM;
|
||||
|
|
Loading…
Reference in New Issue