Re: [edk2-devel][Patch] MdeModulePkg/DxeCapsuleLibFmp: Improve comparisons in CapsuleOnDisk.c

2019-08-14 Thread Wu, Hao A
> -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 
> Cc: Liming Gao 
> Signed-off-by: Wei6 Xu 
> ---
>  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 
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


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#45647): https://edk2.groups.io/g/devel/message/45647
Mute This Topic: https://groups.io/mt/32851277/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel][Patch] MdeModulePkg/DxeCapsuleLibFmp: Improve comparisons in CapsuleOnDisk.c

2019-08-14 Thread Liming Gao
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 
> 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 
> Cc: Liming Gao 
> Signed-off-by: Wei6 Xu 
> ---
>  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++) {
>  if (L'a' <= *Cptr && *Cptr <= L'z') {
>*Cptr = *Cptr - L'a' + L'A';
>  }
>}
> 
> --
> 2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#45641): https://edk2.groups.io/g/devel/message/45641
Mute This Topic: https://groups.io/mt/32851277/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel][Patch] MdeModulePkg/DxeCapsuleLibFmp: Improve comparisons in CapsuleOnDisk.c

2019-08-13 Thread Xu, Wei6
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2028

Non-Boolean comparisons should use a compare operator
(==, !=, >, < >=, <=).

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(-)

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


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#45524): https://edk2.groups.io/g/devel/message/45524
Mute This Topic: https://groups.io/mt/32851277/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-