diff options
author | Laszlo Ersek <lersek@redhat.com> | 2016-06-28 13:52:11 +0200 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2016-06-30 17:27:15 +0200 |
commit | 4a7518d31a0254e4065d308f091bd7bc16dc8dba (patch) | |
tree | 8bcb038b198c79cc0a1b0f5d5800543cf0a684e0 /ShellPkg/Library/UefiShellLib | |
parent | 74e00be5c0cace9a6556f4bc9b5db70efb1d869e (diff) | |
download | edk2-4a7518d31a0254e4065d308f091bd7bc16dc8dba.zip edk2-4a7518d31a0254e4065d308f091bd7bc16dc8dba.tar.gz edk2-4a7518d31a0254e4065d308f091bd7bc16dc8dba.tar.bz2 |
ShellPkg: don't call functions with side effects in ASSERT_EFI_ERROR()
When ASSERT_EFI_ERROR() is compiled out, dependent on build flags, only
the status checking should be removed; the function calls should stay.
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Shumin Qiu <shumin.qiu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Diffstat (limited to 'ShellPkg/Library/UefiShellLib')
-rw-r--r-- | ShellPkg/Library/UefiShellLib/UefiShellLib.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ShellPkg/Library/UefiShellLib/UefiShellLib.c b/ShellPkg/Library/UefiShellLib/UefiShellLib.c index cf89a4a..35a1a71 100644 --- a/ShellPkg/Library/UefiShellLib/UefiShellLib.c +++ b/ShellPkg/Library/UefiShellLib/UefiShellLib.c @@ -373,6 +373,8 @@ EFIAPI ShellInitialize (
)
{
+ EFI_STATUS Status;
+
//
// if auto initialize is not false then skip
//
@@ -383,7 +385,8 @@ ShellInitialize ( //
// deinit the current stuff
//
- ASSERT_EFI_ERROR(ShellLibDestructor(gImageHandle, gST));
+ Status = ShellLibDestructor (gImageHandle, gST);
+ ASSERT_EFI_ERROR (Status);
//
// init the new stuff
|