[edk2-devel] [PATCH EDK2 v1 1/1] BaseTools/EfiRom: remove redundant checking of argc

wenyi,xie via groups.io xiewenyi2=huawei.com at groups.io
Fri Dec 11 02:31:43 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 | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/BaseTools/Source/C/EfiRom/EfiRom.c b/BaseTools/Source/C/EfiRom/EfiRom.c
index a7e2839b0a84..147eb464b01e 100644
--- a/BaseTools/Source/C/EfiRom/EfiRom.c
+++ b/BaseTools/Source/C/EfiRom/EfiRom.c
@@ -1010,16 +1010,6 @@ Returns:
 
         OptionName = Argv[0];
 
-        //
-        // Device IDs specified with -i
-        // Make sure there's at least one more parameter
-        //
-        if (Argc < 1) {
-          Error (NULL, 0, 2000, "Invalid parameter", "Missing Device Id with %s option!", OptionName);
-          ReturnStatus = 1;
-          goto Done;
-        }
-
         //
         // Process until another dash-argument parameter or the end of the list
         //
-- 
2.20.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#68683): https://edk2.groups.io/g/devel/message/68683
Mute This Topic: https://groups.io/mt/78871121/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