From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: hao.a.wu@intel.com) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by groups.io with SMTP; Wed, 14 Aug 2019 18:13:00 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Aug 2019 18:12:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,387,1559545200"; d="scan'208";a="188352473" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 14 Aug 2019 18:12:59 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 14 Aug 2019 18:12:59 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 14 Aug 2019 18:12:59 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.112]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.250]) with mapi id 14.03.0439.000; Thu, 15 Aug 2019 09:12:57 +0800 From: "Wu, Hao A" To: "Xu, Wei6" , "devel@edk2.groups.io" CC: "Gao, Liming" Subject: Re: [edk2-devel][Patch] MdeModulePkg/DxeCapsuleLibFmp: Improve comparisons in CapsuleOnDisk.c Thread-Topic: [edk2-devel][Patch] MdeModulePkg/DxeCapsuleLibFmp: Improve comparisons in CapsuleOnDisk.c Thread-Index: AQHVUcVndD57cEQzI0eZOTG5cAjhHqb7aYTA Date: Thu, 15 Aug 2019 01:12:56 +0000 Message-ID: References: <20190813105349.7312-1-wei6.xu@intel.com> In-Reply-To: <20190813105349.7312-1-wei6.xu@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: hao.a.wu@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Xu, Wei6 > Sent: Tuesday, August 13, 2019 6:54 PM > To: devel@edk2.groups.io > Cc: Wu, Hao A; Gao, Liming > Subject: [edk2-devel][Patch] MdeModulePkg/DxeCapsuleLibFmp: Improve > comparisons in CapsuleOnDisk.c >=20 > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2028 >=20 > Non-Boolean comparisons should use a compare operator > (=3D=3D, !=3D, >, < >=3D, <=3D). >=20 > Cc: Hao A Wu > Cc: Liming Gao > Signed-off-by: Wei6 Xu > --- > MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c > b/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c > index 3193ca8f4d..4c32c6cdcf 100644 > --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c > +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c > @@ -125,11 +125,11 @@ UpperCaseString ( > IN CHAR16 *Str > ) > { > CHAR16 *Cptr; >=20 > - for (Cptr =3D Str; *Cptr; Cptr++) { > + for (Cptr =3D Str; *Cptr !=3D L'\0'; Cptr++) { Reviewed-by: Hao A Wu Pushed via commit f5892aa8d8. Best Regards, Hao Wu > if (L'a' <=3D *Cptr && *Cptr <=3D L'z') { > *Cptr =3D *Cptr - L'a' + L'A'; > } > } >=20 > -- > 2.16.2.windows.1