From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) by mx.groups.io with SMTP id smtpd.web11.7505.1608014728323775031 for ; Mon, 14 Dec 2020 22:45:29 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: huawei.com, ip: 45.249.212.32, mailfrom: xiewenyi2@huawei.com) Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4Cw7zX0zTqzhsyq; Tue, 15 Dec 2020 14:44:56 +0800 (CST) Received: from HGH1000039998.huawei.com (10.184.68.188) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.498.0; Tue, 15 Dec 2020 14:45:14 +0800 From: "wenyi,xie" To: , , , CC: , Subject: [PATCH EDK2 v2 1/1] BaseTools/EfiRom: remove redundant checking of argc Date: Tue, 15 Dec 2020 14:43:30 +0800 Message-ID: <1608014610-110183-2-git-send-email-xiewenyi2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1608014610-110183-1-git-send-email-xiewenyi2@huawei.com> References: <1608014610-110183-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 | 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