[edk2-devel] [PATCH EDK2 v2 1/1] BaseTools/EfiRom: remove redundant checking of argc
wenyi,xie via groups.io
xiewenyi2=huawei.com at groups.io
Tue Dec 15 06:43:30 UTC 2020
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 at intel.com>
Cc: Liming Gao <gaoliming at byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen at intel.com>
Signed-off-by: Wenyi Xie <xiewenyi2 at 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
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#68845): https://edk2.groups.io/g/devel/message/68845
Mute This Topic: https://groups.io/mt/78971355/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list