From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by mx.groups.io with SMTP id smtpd.web11.1126.1607654018469637684 for ; Thu, 10 Dec 2020 18:33:42 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: huawei.com, ip: 45.249.212.191, mailfrom: xiewenyi2@huawei.com) Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4CsZZj30hYzhXfC; Fri, 11 Dec 2020 10:33:01 +0800 (CST) Received: from HGH1000039998.huawei.com (10.184.68.188) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Fri, 11 Dec 2020 10:33:25 +0800 From: "wenyi,xie" To: , , , CC: , Subject: [PATCH EDK2 v1 1/1] BaseTools/EfiRom: remove redundant checking of argc Date: Fri, 11 Dec 2020 10:31:43 +0800 Message-ID: <1607653903-125927-2-git-send-email-xiewenyi2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1607653903-125927-1-git-send-email-xiewenyi2@huawei.com> References: <1607653903-125927-1-git-send-email-xiewenyi2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.184.68.188] X-CFilter-Loop: Reflected Content-Type: text/plain As the condition of while statement is argc > 0, so argc < 1 will always be false, it's redundant. Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Signed-off-by: Wenyi Xie --- 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