public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wu, Hao A" <hao.a.wu@intel.com>
To: "Xu, Wei6" <wei6.xu@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Gao, Liming" <liming.gao@intel.com>
Subject: Re: [edk2-devel][Patch] MdeModulePkg/DxeCapsuleLibFmp: Improve comparisons in CapsuleOnDisk.c
Date: Thu, 15 Aug 2019 01:12:56 +0000	[thread overview]
Message-ID: <B80AF82E9BFB8E4FBD8C89DA810C6A093C9199E8@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20190813105349.7312-1-wei6.xu@intel.com>

> -----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
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2028
> 
> Non-Boolean comparisons should use a compare operator
> (==, !=, >, < >=, <=).
> 
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
> ---
>  MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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;
> 
> -  for (Cptr = Str; *Cptr; Cptr++) {
> +  for (Cptr = Str; *Cptr != L'\0'; Cptr++) {


Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Pushed via commit f5892aa8d8.

Best Regards,
Hao Wu


>      if (L'a' <= *Cptr && *Cptr <= L'z') {
>        *Cptr = *Cptr - L'a' + L'A';
>      }
>    }
> 
> --
> 2.16.2.windows.1


      parent reply	other threads:[~2019-08-15  1:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-13 10:53 [edk2-devel][Patch] MdeModulePkg/DxeCapsuleLibFmp: Improve comparisons in CapsuleOnDisk.c Xu, Wei6
2019-08-15  0:28 ` Liming Gao
2019-08-15  1:12 ` Wu, Hao A [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B80AF82E9BFB8E4FBD8C89DA810C6A093C9199E8@SHSMSX104.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox