From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web08.33564.1608516231903283177 for ; Sun, 20 Dec 2020 18:03:52 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=kW7hjfXf; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: bob.c.feng@intel.com) IronPort-SDR: aMJ0dCleZ0JsJKCbPnoS+Qapnymf00uhL/xCTFdSuRT3otQGyX1GtdGbka3YS301+an2KM36Yq j7SchdwtDC7w== X-IronPort-AV: E=McAfee;i="6000,8403,9841"; a="239755623" X-IronPort-AV: E=Sophos;i="5.78,436,1599548400"; d="scan'208";a="239755623" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2020 18:03:50 -0800 IronPort-SDR: 62JkunWpuqf8HxxpeaN6s0906W8nCXyb+hMDlHcImiUT+/PkN0U0LYSWyE1ANaX2EZuFxjFdIz hRsZekqac6lQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,436,1599548400"; d="scan'208";a="381694585" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga007.jf.intel.com with ESMTP; 20 Dec 2020 18:03:50 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sun, 20 Dec 2020 18:03:50 -0800 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sun, 20 Dec 2020 18:03:49 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Sun, 20 Dec 2020 18:03:49 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Sun, 20 Dec 2020 18:03:49 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZrkntyMAoAV7xu4CSQBCRcFJcv2oDL5iv5yigfgxhdECtg6gPM6hffXIi5VkO6MS+A9zw5chCapJmnG5vBAfxfXgsR+w08OLWOjZzeMJbsgnowUcngMPXuwcpdhnuFP5iT6MzXg/ND1Ie6TcBbWmkUe3WGzbI55OGapGLKBAJiRNofrY12IZobG4SYl5UGTbgg/02ajXz98FbgUydcgM+Y+dR7GJ3aLOJRRsf6RUqCABbxUFNUkwZ42GeV+NmymzBNuJcUaqvKgu0vxeFoGhDs3r+b5aWHZ+fdXIEoTi1pMWekZQjpqEESYjlW2NQud1LaQJ/B6JTb4QO3xOsFMCrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5L6mb3LxlLKtbM1Sny0r5FbPYX8ZGSIryUqUiM8j1zU=; b=cspl2cfWqvUiZiOOEnssqhVld5B30gasMTYltEV6ambZu7iIMdl7dLzCr9YpbvrEEEglvPO0Tc7pK5mG9FZoleo2t6ZDUAcLuNo8T3j+d8bhsEhJkDo47agXazm431Z4nAkelV8kdwMXzwOV45k+CqMwN86Qo8gFvK6Tq7A1wQE6I3QrKFSADYHJvLojsswoLWr31qghBJJUoKE6CCfKGknXV0m1kjvUE55XhfZ19NK4eyynmtN7YZ5JEHy9NeIbkdcBhJxc+djQRUaqXcXuCS4Z0K71abFZTfmf8Kv8LU+UxMLHZNMUa+qK+VECTOu/YLPS9pp02t45aUVeFORb7Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5L6mb3LxlLKtbM1Sny0r5FbPYX8ZGSIryUqUiM8j1zU=; b=kW7hjfXfZEu0uIv/nrM1+utTGhiJEGWBDphlzQrmi+mbGB7PHaaFac0m3NCmF4chunoLkE75x7CSbSwio64yKB3Vq4mjOAoQGSRRzaJtXTJ4ND9FAa6WEnPmCMcGqeypFqlncvn7U328Mpzs79kEIiHQ6GpyvOtUFW6rBdg/ufQ= Received: from DM6PR11MB4073.namprd11.prod.outlook.com (2603:10b6:5:19f::22) by DM6PR11MB4723.namprd11.prod.outlook.com (2603:10b6:5:2a0::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3676.25; Mon, 21 Dec 2020 02:03:46 +0000 Received: from DM6PR11MB4073.namprd11.prod.outlook.com ([fe80::c9f:47ea:6321:5ccb]) by DM6PR11MB4073.namprd11.prod.outlook.com ([fe80::c9f:47ea:6321:5ccb%3]) with mapi id 15.20.3676.033; Mon, 21 Dec 2020 02:03:46 +0000 From: "Bob Feng" To: "devel@edk2.groups.io" , "xiewenyi2@huawei.com" , "gaoliming@byosoft.com.cn" , "Chen, Christine" CC: "songdongkuang@huawei.com" Subject: Re: [edk2-devel] [PATCH EDK2 v2 1/1] BaseTools/EfiRom: remove redundant checking of argc Thread-Topic: [edk2-devel] [PATCH EDK2 v2 1/1] BaseTools/EfiRom: remove redundant checking of argc Thread-Index: AQHW0q3op3/X0ZPLlEmaW1I7zOGi06oA1aEA Date: Mon, 21 Dec 2020 02:03:46 +0000 Message-ID: References: <1608014610-110183-1-git-send-email-xiewenyi2@huawei.com> <1608014610-110183-2-git-send-email-xiewenyi2@huawei.com> In-Reply-To: <1608014610-110183-2-git-send-email-xiewenyi2@huawei.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.37] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d6aaf9f1-a973-45a7-538d-08d8a554a6d6 x-ms-traffictypediagnostic: DM6PR11MB4723: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2150; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 7yWWb72U7gCLEZ5twuXt+ZBxZXZMkuVPfhOiKUh3nksro7e5E91M0Hg6uZZvtGF276J91hqBqB5vZNnHAjSodWhyptHURqvp81hWmI95Nu+z0hgSHQUYXor46uhoXCwtpTFfOcVax76CXT2AimgELaPcPl4mSAtTQSY5gkd4Amm0cQzxuMpM+prUPhNWfTaiR0QybbZ7/TY5OU3DA4qNG5uB7aImc5J19CxjPmg4y50uAsQKxKxc8fPtd6mgICdOoiHMicwqqIavGkHKUve3TTBOrJNBVlXUtzaOxwWqV1ne1WiUBwr/MLrydrQU++EtVYFBN2qy1vaWo8VbyUJ/d01w5HanZY58fpTyvflriNTAVRmYIlQ+zUlapeFFQpGHS74HwIrZjf06KehHJqWqrMic6uj4Aeekm3TnSerlxFLoU24g8NOj2hrlhXRO7A/MM5IvoLwr05rmihu7Xi1Clw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4073.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(39860400002)(136003)(376002)(346002)(396003)(366004)(966005)(4326008)(71200400001)(8936002)(478600001)(66946007)(83380400001)(5660300002)(66476007)(66446008)(66556008)(2906002)(76116006)(64756008)(52536014)(6636002)(110136005)(7696005)(186003)(33656002)(316002)(86362001)(53546011)(6506007)(26005)(9686003)(55016002)(8676002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?xNc+Gsd/cexdEW/h23Tlg/BRQ7F4PiZHWnGki3bKVNk59TncWXj76uALB695?= =?us-ascii?Q?Lpy1efhYsZtuZgrZ+Cel3+E9LDlHnAFPtNj9sH1rprsr5Ffuv2C7VlzkouaF?= =?us-ascii?Q?Bya6US1NQD8JSaSZ8lLOIeSxbExppxPq8Uwfi9s5rOs7GDTFd518guz4igzO?= =?us-ascii?Q?a9bHrvv4zJ2vNDHj/cO5KRcMsdb6X+LGYtx5GXmOLHG8L6Po2cvkNftOlLIg?= =?us-ascii?Q?dYhU3M5EReKRjlLPHEB6+CM2PQn7D2kiUweUd00Ns6Roubr13CT7+j33CsDN?= =?us-ascii?Q?9a4FYk2j7jTm7xYTeVsfoPpy/zt15qpxqzMQLRkJVvUdBKWsctFzYQnZWcqY?= =?us-ascii?Q?iH62SpioCT1eoHVh2XhSxKhMAPcfc41NMKxRzo393e+R944yJI19e1UQ8U31?= =?us-ascii?Q?akqZjD2pbxHzUQ9gzpA4hZqAuBXZ6mCbxuMHJJA8/r/CKgxVQTGZ1LZtc5je?= =?us-ascii?Q?3vagBmITBp65dx3nlc2y28SeJpy7WbO18osGtTRErjZCVLF6gzsg8Jgjnuz2?= =?us-ascii?Q?WlEKbzoiMIcursjUMUoOCQFrorAjuj5H6z8mFQkAb9WIEh+hmKqCrEr1oYI3?= =?us-ascii?Q?Jnrjaq53HUGdn0kha+uQRW+R4utUvBsRNQxujB38xTYM3bN2WgUkmK+0Wz1w?= =?us-ascii?Q?nCyBKk3MZB4rXuWBr1o2l816aubfcMSUNlW35/qXjd780mCmAFGZoGUD90ck?= =?us-ascii?Q?TCV0HniegcAeqY8r5dryMpPuhz2t1duWmLsnFBH2t+yJEA0Y/xTfyLmITAEv?= =?us-ascii?Q?f0k2D+Wm9A9vw/ilal396VobOvCvW7v8xpBJAu+aC+kGhX/VpTTQBYhI7DwX?= =?us-ascii?Q?rp6n7TM9gxDmT4kEgXasALi7Yc3QuVzK1hSIAUCWwXEeZGj+63hrkPEcctoE?= =?us-ascii?Q?O2K4reQxR1x3w/+eSnLkQO6vRR0r6Rtn1WRexMY+isaRJTq+fgGreJ/WbQln?= =?us-ascii?Q?P2nSBmyevb0Q6VUQvjUwAkBDsuYzGSB6H2+ZrCqKyIk=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4073.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d6aaf9f1-a973-45a7-538d-08d8a554a6d6 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Dec 2020 02:03:46.6295 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Sw9vOf4ncSccuBsqSvHT1pnDOiBxeTZgXCO8JO/SPMVfvPK/e4WGhm45/1O8psufcchQyU7+5jYo3Lanx1B/IQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4723 Return-Path: bob.c.feng@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bob Feng -----Original Message----- From: devel@edk2.groups.io On Behalf Of wenyi,xie v= ia groups.io Sent: Tuesday, December 15, 2020 2:44 PM To: devel@edk2.groups.io; Feng, Bob C ; gaoliming@by= osoft.com.cn; Chen, Christine Cc: songdongkuang@huawei.com; xiewenyi2@huawei.com Subject: [edk2-devel] [PATCH EDK2 v2 1/1] BaseTools/EfiRom: remove redunda= nt checking of argc As the condition of while statement is argc > 0, so argc < 1 will always b= e 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/EfiRo= m/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 =3D=3D 1) { Error (NULL, 0, 2000, "Invalid parameter", "Missing Device Id w= ith %s option!", OptionName); ReturnStatus =3D 1; goto Done; -- 2.20.1.windows.1