From 9ee135501b7138126e537adc58352c4126c33fcb Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Sat, 7 Sep 2019 15:13:39 +0200 Subject: [PATCH] MdeModulePkg: PEI Core: clean up "AprioriFile" handling in FindFileEx() Clean up two issues around FindFileEx(): - The "AprioriFile" parameter's type differs between the function declaration and the function definition. The correct type is (EFI_PEI_FILE_HANDLE*). - "FfsFileHeader" has type (EFI_FFS_FILE_HEADER*); for clarity, we should cast it explicitly to EFI_PEI_FILE_HANDLE when assigning it to (*AprioriFile). This is a semantic cleanup, there is no functional change. Cc: Dandan Bi Cc: Hao A Wu Cc: Jian J Wang Cc: Liming Gao Signed-off-by: Laszlo Ersek Reviewed-by: Dandan Bi Reviewed-by: Philippe Mathieu-Daude Reviewed-by: Hao A Wu --- MdeModulePkg/Core/Pei/FwVol/FwVol.c | 2 +- MdeModulePkg/Core/Pei/FwVol/FwVol.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c b/MdeModulePkg/Core/Pei/FwVol/FwVol.c index 709db00694..f4642c47c1 100644 --- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c +++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c @@ -407,7 +407,7 @@ FindFileEx ( } else if (AprioriFile != NULL) { if (FfsFileHeader->Type == EFI_FV_FILETYPE_FREEFORM) { if (CompareGuid (&FfsFileHeader->Name, &gPeiAprioriFileNameGuid)) { - *AprioriFile = FfsFileHeader; + *AprioriFile = (EFI_PEI_FILE_HANDLE)FfsFileHeader; } } } diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.h b/MdeModulePkg/Core/Pei/FwVol/FwVol.h index 4082cfbec1..ca80e84e0f 100644 --- a/MdeModulePkg/Core/Pei/FwVol/FwVol.h +++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.h @@ -299,7 +299,7 @@ FindFileEx ( IN CONST EFI_GUID *FileName, OPTIONAL IN EFI_FV_FILETYPE SearchType, IN OUT EFI_PEI_FILE_HANDLE *FileHandle, - IN OUT EFI_PEI_FV_HANDLE *AprioriFile OPTIONAL + IN OUT EFI_PEI_FILE_HANDLE *AprioriFile OPTIONAL ); /**