From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=jian.j.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 186C521180F5B for ; Fri, 26 Oct 2018 19:13:28 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Oct 2018 19:13:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,430,1534834800"; d="scan'208";a="103687787" Received: from jwang36-mobl2.ccr.corp.intel.com ([10.239.192.20]) by orsmga002.jf.intel.com with ESMTP; 26 Oct 2018 19:13:27 -0700 From: Jian J Wang To: edk2-devel@lists.01.org Cc: Dandan Bi , Star Zeng Date: Sat, 27 Oct 2018 10:13:24 +0800 Message-Id: <20181027021324.18528-1-jian.j.wang@intel.com> X-Mailer: git-send-email 2.19.0.windows.1 MIME-Version: 1.0 Subject: [PATCH] MdeModulePkg/Core: correct one coding style X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2018 02:13:29 -0000 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1284 Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=) Cc: Dandan Bi Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- 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