]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg: Fix Ecc error 3002 in MmCommunicationDxe
authorPierre Gondois <Pierre.Gondois@arm.com>
Thu, 10 Dec 2020 10:18:56 +0000 (10:18 +0000)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 6 Jan 2021 16:22:54 +0000 (16:22 +0000)
This patch fixes the following Ecc reported error:
Non-Boolean comparisons should use a compare operator
(==, !=, >, < >=, <=)

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c

index 9457eaf1d809224a64b0225960f6f3ae083dbb4b..b1e30958098800d1411db2926d525e50e7ac57ef 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-  Copyright (c) 2016-2019, ARM Limited. All rights reserved.\r
+  Copyright (c) 2016-2021, Arm Limited. All rights reserved.<BR>\r
 \r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
@@ -96,7 +96,7 @@ MmCommunication2Communicate (
                sizeof (CommunicateHeader->MessageLength);\r
 \r
   // If the length of the CommBuffer is 0 then return the expected length.\r
-  if (CommSize) {\r
+  if (CommSize != 0) {\r
     // This case can be used by the consumer of this driver to find out the\r
     // max size that can be used for allocating CommBuffer.\r
     if ((*CommSize == 0) ||\r