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.151, mailfrom: liming.gao@intel.com) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by groups.io with SMTP; Wed, 14 Aug 2019 17:28:10 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Aug 2019 17:28:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,387,1559545200"; d="scan'208";a="376221534" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga005.fm.intel.com with ESMTP; 14 Aug 2019 17:28:10 -0700 Received: from fmsmsx163.amr.corp.intel.com (10.18.125.72) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 14 Aug 2019 17:28:10 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by fmsmsx163.amr.corp.intel.com (10.18.125.72) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 14 Aug 2019 17:28:09 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.112]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.249]) with mapi id 14.03.0439.000; Thu, 15 Aug 2019 08:28:08 +0800 From: "Liming Gao" To: "Xu, Wei6" , "devel@edk2.groups.io" CC: "Wu, Hao A" 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: AQHVUcVnCf5IZpyZ00Cg2B/G/iONS6b7XQ2A Date: Thu, 15 Aug 2019 00:28:07 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E4D120B@SHSMSX104.ccr.corp.intel.com> References: <20190813105349.7312-1-wei6.xu@intel.com> In-Reply-To: <20190813105349.7312-1-wei6.xu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNmFkMDg4ZjctYzZmMS00MTQzLWE4NTAtZDkyOTQyOTM1MDk4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiUjlTSE1FZWFnMUhpYzBHNk9tY3FVMnU1MFZKZld0VHlIdFBTQWZtNjRVbnNYUFEzRXpMSTVUVjQ0eFhTOXBXbCJ9 dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----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 compa= risons 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/MdeM= odulePkg/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++) { > if (L'a' <=3D *Cptr && *Cptr <=3D L'z') { > *Cptr =3D *Cptr - L'a' + L'A'; > } > } >=20 > -- > 2.16.2.windows.1