]> git.proxmox.com Git - mirror_edk2.git/commit
StandaloneMmPkg: Fix ECC error 3002 in StandaloneMmCpu
authorSami Mujawar <sami.mujawar@arm.com>
Thu, 3 Dec 2020 18:33:58 +0000 (18:33 +0000)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 7 Jan 2021 11:13:39 +0000 (11:13 +0000)
commita9da96ac2ae6af4df2ef1c036a18c3092783cfa6
treefe017929a11fd0f33575f02760efa709114d99c0
parent9ef62f5078c33368cbf481e36adb2ae3c450f835
StandaloneMmPkg: Fix ECC error 3002 in StandaloneMmCpu

Bugzilla: 3150 (https://bugzilla.tianocore.org/show_bug.cgi?id=3150)

Fix the ECC tool reported error "[3002] Non-Boolean comparisons
should use a compare operator".

Also fix the following:
 - add curly braces for 'if' condition statements to comply
   with the coding standard.
 - The value returned by GET_GUID_HOB_DATA() is stored in
   *HobData. Therefore, check *HobData against NULL. The
   original code was checking HobData which is incorrect.

Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c
StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.c