[edk2-devel] [PATCH EDK2 v2 1/1] BaseTools/EfiRom: remove redundant checking of argc
Bob Feng
bob.c.feng at intel.com
Mon Dec 21 02:03:46 UTC 2020
Reviewed-by: Bob Feng <bob.c.feng at intel.com>
-----Original Message-----
From: devel at edk2.groups.io <devel at edk2.groups.io> On Behalf Of wenyi,xie via groups.io
Sent: Tuesday, December 15, 2020 2:44 PM
To: devel at edk2.groups.io; Feng, Bob C <bob.c.feng at intel.com>; gaoliming at byosoft.com.cn; Chen, Christine <yuwei.chen at intel.com>
Cc: songdongkuang at huawei.com; xiewenyi2 at huawei.com
Subject: [edk2-devel] [PATCH EDK2 v2 1/1] BaseTools/EfiRom: remove redundant checking of argc
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 (#69289): https://edk2.groups.io/g/devel/message/69289
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