summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2019-09-07 15:13:39 +0200
committerLaszlo Ersek <lersek@redhat.com>2019-10-09 09:40:10 +0200
commit9ee135501b7138126e537adc58352c4126c33fcb (patch)
treea9565e117dd9ae6fd8a74d0ad7209f2c6228e073
parentf9319840152899926dd11ccf7b9ed04009db929e (diff)
downloadedk2-9ee135501b7138126e537adc58352c4126c33fcb.tar.gz
edk2-9ee135501b7138126e537adc58352c4126c33fcb.tar.bz2
edk2-9ee135501b7138126e537adc58352c4126c33fcb.zip
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 <dandan.bi@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
-rw-r--r--MdeModulePkg/Core/Pei/FwVol/FwVol.c2
-rw-r--r--MdeModulePkg/Core/Pei/FwVol/FwVol.h2
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
);
/**