From: "wenyi,xie" <xiewenyi2@huawei.com>
To: <devel@edk2.groups.io>, <bob.c.feng@intel.com>,
<gaoliming@byosoft.com.cn>, <yuwei.chen@intel.com>
Cc: <songdongkuang@huawei.com>, <xiewenyi2@huawei.com>
Subject: [PATCH EDK2 v2 1/1] BaseTools/EfiRom: remove redundant checking of argc
Date: Tue, 15 Dec 2020 14:43:30 +0800 [thread overview]
Message-ID: <1608014610-110183-2-git-send-email-xiewenyi2@huawei.com> (raw)
In-Reply-To: <1608014610-110183-1-git-send-email-xiewenyi2@huawei.com>
As the condition of while statement is argc > 0, so argc < 1 will always
be false, it's redundant.
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com>
---
BaseTools/Source/C/EfiRom/EfiRom.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/BaseTools/Source/C/EfiRom/EfiRom.c b/BaseTools/Source/C/EfiRom/EfiRom.c
index a7e2839b0a84..2506f559d574 100644
--- a/BaseTools/Source/C/EfiRom/EfiRom.c
+++ b/BaseTools/Source/C/EfiRom/EfiRom.c
@@ -1014,7 +1014,7 @@ Returns:
// Device IDs specified with -i
// Make sure there's at least one more parameter
//
- if (Argc < 1) {
+ if (Argc == 1) {
Error (NULL, 0, 2000, "Invalid parameter", "Missing Device Id with %s option!", OptionName);
ReturnStatus = 1;
goto Done;
--
2.20.1.windows.1
next prev parent reply other threads:[~2020-12-15 6:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-15 6:43 [PATCH EDK2 v2 0/1] BaseTools/EfiRom: remove redundant checking of argc wenyi,xie
2020-12-15 6:43 ` wenyi,xie [this message]
2020-12-21 2:03 ` [edk2-devel] [PATCH EDK2 v2 1/1] " Bob Feng
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=1608014610-110183-2-git-send-email-xiewenyi2@huawei.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