public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] MdeModulePkg/Core: correct one coding style
@ 2018-10-27  2:13 Jian J Wang
  2018-10-27  2:16 ` Bi, Dandan
  0 siblings, 1 reply; 3+ messages in thread
From: Jian J Wang @ 2018-10-27  2:13 UTC (permalink / raw)
  To: edk2-devel; +Cc: Dandan Bi, Star Zeng

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1284

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

Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
---
 MdeModulePkg/Core/Dxe/Mem/HeapGuard.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
index 521e0d7b2a..9f89df8d8f 100644
--- a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
+++ b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
@@ -1559,7 +1559,7 @@ PromoteGuardedFreePages (
     }
   }
 
-  if (AvailablePages) {
+  if (AvailablePages != 0) {
     DEBUG ((DEBUG_INFO, "Promoted pages: %lX (%lx)\r\n", Start, (UINT64)AvailablePages));
     ClearGuardedMemoryBits (Start, AvailablePages);
 
-- 
2.19.0.windows.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] MdeModulePkg/Core: correct one coding style
  2018-10-27  2:13 [PATCH] MdeModulePkg/Core: correct one coding style Jian J Wang
@ 2018-10-27  2:16 ` Bi, Dandan
  2018-10-29 16:29   ` Jeremiah Cox
  0 siblings, 1 reply; 3+ messages in thread
From: Bi, Dandan @ 2018-10-27  2:16 UTC (permalink / raw)
  To: Wang, Jian J, edk2-devel@lists.01.org; +Cc: Zeng, Star

Reviewed-by: Bi Dandan <dandan.bi@intel.com>

Thanks,
Dandan

> -----Original Message-----
> From: Wang, Jian J
> Sent: Saturday, October 27, 2018 10:13 AM
> To: edk2-devel@lists.01.org
> Cc: Bi, Dandan <dandan.bi@intel.com>; Zeng, Star <star.zeng@intel.com>
> Subject: [PATCH] MdeModulePkg/Core: correct one coding style
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1284
> 
> Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=)
> 
> Cc: Dandan Bi <dandan.bi@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
> ---
>  MdeModulePkg/Core/Dxe/Mem/HeapGuard.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
> b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
> index 521e0d7b2a..9f89df8d8f 100644
> --- a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
> +++ b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
> @@ -1559,7 +1559,7 @@ PromoteGuardedFreePages (
>      }
>    }
> 
> -  if (AvailablePages) {
> +  if (AvailablePages != 0) {
>      DEBUG ((DEBUG_INFO, "Promoted pages: %lX (%lx)\r\n", Start,
> (UINT64)AvailablePages));
>      ClearGuardedMemoryBits (Start, AvailablePages);
> 
> --
> 2.19.0.windows.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] MdeModulePkg/Core: correct one coding style
  2018-10-27  2:16 ` Bi, Dandan
@ 2018-10-29 16:29   ` Jeremiah Cox
  0 siblings, 0 replies; 3+ messages in thread
From: Jeremiah Cox @ 2018-10-29 16:29 UTC (permalink / raw)
  To: Bi, Dandan, Wang, Jian J, edk2-devel@lists.01.org; +Cc: Zeng, Star

Please ignore, testing DMARC issue

-----Original Message-----
From: edk2-devel <edk2-devel-bounces@lists.01.org> On Behalf Of Bi, Dandan
Sent: Friday, October 26, 2018 7:16 PM
To: Wang, Jian J <jian.j.wang@intel.com>; edk2-devel@lists.01.org
Cc: Zeng, Star <star.zeng@intel.com>
Subject: Re: [edk2] [PATCH] MdeModulePkg/Core: correct one coding style

Reviewed-by: Bi Dandan <dandan.bi@intel.com>

Thanks,
Dandan

> -----Original Message-----
> From: Wang, Jian J
> Sent: Saturday, October 27, 2018 10:13 AM
> To: edk2-devel@lists.01.org
> Cc: Bi, Dandan <dandan.bi@intel.com>; Zeng, Star <star.zeng@intel.com>
> Subject: [PATCH] MdeModulePkg/Core: correct one coding style
> 
> REF: 
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzi
> lla.tianocore.org%2Fshow_bug.cgi%3Fid%3D1284&amp;data=02%7C01%7Cjereco
> x%40microsoft.com%7Cf845cc7305144d6fa26108d63bb232cd%7C72f988bf86f141a
> f91ab2d7cd011db47%7C1%7C0%7C636762033910771752&amp;sdata=Dsl5pUhg5plef
> EERnF4LnU87wwY9XBkzz%2FIw8mlP%2FdU%3D&amp;reserved=0
> 
> Non-Boolean comparisons should use a compare operator (==, !=, >, < 
> >=, <=)
> 
> Cc: Dandan Bi <dandan.bi@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
> ---
>  MdeModulePkg/Core/Dxe/Mem/HeapGuard.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
> b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
> index 521e0d7b2a..9f89df8d8f 100644
> --- a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
> +++ b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
> @@ -1559,7 +1559,7 @@ PromoteGuardedFreePages (
>      }
>    }
> 
> -  if (AvailablePages) {
> +  if (AvailablePages != 0) {
>      DEBUG ((DEBUG_INFO, "Promoted pages: %lX (%lx)\r\n", Start, 
> (UINT64)AvailablePages));
>      ClearGuardedMemoryBits (Start, AvailablePages);
> 
> --
> 2.19.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fedk2-devel&amp;data=02%7C01%7Cjerecox%40microsoft.com%7Cf845cc7305144d6fa26108d63bb232cd%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636762033910771752&amp;sdata=c3FltaTxgnzeGkEnwF1dDBc4CGyWn19XuUjnHPrgC%2Fs%3D&amp;reserved=0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-29 16:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-27  2:13 [PATCH] MdeModulePkg/Core: correct one coding style Jian J Wang
2018-10-27  2:16 ` Bi, Dandan
2018-10-29 16:29   ` Jeremiah Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox