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

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