summaryrefslogtreecommitdiff
path: root/EmbeddedPkg
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@oss.qualcomm.com>2025-07-10 14:18:51 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2025-09-11 21:05:29 +0000
commit24fd71dcaa7869b5aecfd3f429e9549d55af9dcb (patch)
treec711fbc96a702fb77e1d27894f8fd19973a52f22 /EmbeddedPkg
parent6b19b447c5b3c8bb5adbf84d56fc9b6e8dda238a (diff)
downloadedk2-24fd71dcaa7869b5aecfd3f429e9549d55af9dcb.tar.gz
edk2-24fd71dcaa7869b5aecfd3f429e9549d55af9dcb.zip
EmbeddedPkg/PrePiLib: eliminate unneeded variable in FfsProcessSection ()
The "Found" variable provided only a deferred form of success handling, so eliminate it to improve readability. Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
Diffstat (limited to 'EmbeddedPkg')
-rw-r--r--EmbeddedPkg/Library/PrePiLib/FwVol.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/EmbeddedPkg/Library/PrePiLib/FwVol.c b/EmbeddedPkg/Library/PrePiLib/FwVol.c
index aea122d1d0..f15796b166 100644
--- a/EmbeddedPkg/Library/PrePiLib/FwVol.c
+++ b/EmbeddedPkg/Library/PrePiLib/FwVol.c
@@ -385,18 +385,14 @@ FfsProcessSection (
if (Section->Type == SectionType) {
if (SectionCheckHook != NULL) {
- Found = SectionCheckHook (Section) == EFI_SUCCESS;
- } else {
- Found = TRUE;
+ if (SectionCheckHook (Section) != EFI_SUCCESS) {
+ goto CheckNextSection;
+ }
}
- if (Found) {
- *OutputBuffer = (VOID *)((UINT8 *)Section + SectionHeaderSize);
+ *OutputBuffer = (VOID *)((UINT8 *)Section + SectionHeaderSize);
- return EFI_SUCCESS;
- } else {
- goto CheckNextSection;
- }
+ return EFI_SUCCESS;
} else if ((Section->Type == EFI_SECTION_COMPRESSION) || (Section->Type == EFI_SECTION_GUID_DEFINED)) {
CHAR8 *CompressedData;
UINT32 CompressionSectionHeaderSize;