summaryrefslogtreecommitdiffstats
path: root/ArmPkg/Library/SemihostLib
diff options
context:
space:
mode:
authorPierre Gondois <Pierre.Gondois@arm.com>2020-12-10 13:14:07 +0000
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-01-06 16:22:54 +0000
commit58bba221b78ba9dd8d2bc3a75f032299b2b951ca (patch)
treeff79dfd9d3a4cb4ca7e14f752871d0bfd86206de /ArmPkg/Library/SemihostLib
parent02c621f3f7a3131e6c7a4bab6a507546632959d7 (diff)
downloadedk2-58bba221b78ba9dd8d2bc3a75f032299b2b951ca.tar.gz
edk2-58bba221b78ba9dd8d2bc3a75f032299b2b951ca.tar.bz2
edk2-58bba221b78ba9dd8d2bc3a75f032299b2b951ca.zip
ArmPkg: Fix Ecc error 5007 in SemihostLib
This patch fixes the following Ecc reported error: There should be no initialization of a variable as part of its declaration Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Diffstat (limited to 'ArmPkg/Library/SemihostLib')
-rw-r--r--ArmPkg/Library/SemihostLib/SemihostLib.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ArmPkg/Library/SemihostLib/SemihostLib.c b/ArmPkg/Library/SemihostLib/SemihostLib.c
index 78b862468b..a75d45850d 100644
--- a/ArmPkg/Library/SemihostLib/SemihostLib.c
+++ b/ArmPkg/Library/SemihostLib/SemihostLib.c
@@ -1,7 +1,7 @@
/** @file
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
- Copyright (c) 2013 - 2014, ARM Ltd. All rights reserved.<BR>
+ Copyright (c) 2013 - 2021, Arm Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -135,9 +135,7 @@ SemihostFileClose (
IN UINTN FileHandle
)
{
- INT32 Result = Semihost_SYS_CLOSE(&FileHandle);
-
- if (Result == -1) {
+ if (Semihost_SYS_CLOSE (&FileHandle) == -1) {
return RETURN_INVALID_PARAMETER;
} else {
return RETURN_SUCCESS;