Simplify FfsProcessSection logic by breaking the continuation of the main loop as a new if statement that executes if the very first test doesn't end up returning.
Signed-off-by: Leif Lindholm <l...@nuviainc.com> --- EmbeddedPkg/Library/PrePiLib/FwVol.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/EmbeddedPkg/Library/PrePiLib/FwVol.c b/EmbeddedPkg/Library/PrePiLib/FwVol.c index 90b5b4444002..fc40d8650be1 100644 --- a/EmbeddedPkg/Library/PrePiLib/FwVol.c +++ b/EmbeddedPkg/Library/PrePiLib/FwVol.c @@ -317,8 +317,9 @@ FfsProcessSection ( } return EFI_SUCCESS; - } else if ((Section->Type == EFI_SECTION_COMPRESSION) || (Section->Type == EFI_SECTION_GUID_DEFINED)) { + } + if ((Section->Type == EFI_SECTION_COMPRESSION) || (Section->Type == EFI_SECTION_GUID_DEFINED)) { if (Section->Type == EFI_SECTION_COMPRESSION) { if (IS_SECTION2 (Section)) { CompressionSection2 = (EFI_COMPRESSION_SECTION2 *) Section; -- 2.20.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#61925): https://edk2.groups.io/g/devel/message/61925 Mute This Topic: https://groups.io/mt/75244269/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-