From: "Leif Lindholm" <leif@nuviainc.com>
To: devel@edk2.groups.io
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>, macarl@microsoft.com
Subject: [RFC 2/5] EmbeddedPkg/PrePiLib: drop else if after return
Date: Wed, 1 Jul 2020 21:01:15 +0100 [thread overview]
Message-ID: <20200701200118.3972-3-leif@nuviainc.com> (raw)
In-Reply-To: <20200701200118.3972-1-leif@nuviainc.com>
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 <leif@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
next prev parent reply other threads:[~2020-07-01 20:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-01 20:01 [RFC 0/5] EmbeddedPkg/PrePiLib: rework FfsProcessSection Leif Lindholm
2020-07-01 20:01 ` [RFC 1/5] EmbeddedPkg/PrePiLib: style cleanup in FwVol.c Leif Lindholm
2020-07-01 20:01 ` Leif Lindholm [this message]
2020-07-01 20:01 ` [RFC 3/5] EmbeddedPkg/PrePiLib: refactor IS_SECTION2() handling Leif Lindholm
2020-07-01 20:01 ` [RFC 4/5] EmbeddedPkg/PrePiLib: drop spurious re-init of CompressedData Leif Lindholm
2020-07-01 20:01 ` [RFC 5/5] EmbeddedPkg/PrePiLib: break section extraction info into helper function Leif Lindholm
2020-07-02 6:22 ` [RFC 0/5] EmbeddedPkg/PrePiLib: rework FfsProcessSection Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200701200118.3972-3-leif@nuviainc.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox