From a55b4d6688879b7dae213bc2b56ce95d4c70d6c4 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 19 Oct 2017 15:02:41 -0400 Subject: lib: Use EFI_ERROR() instead of comparing to EFI_SUCCESS everywhere. Also consistently name our status variable "efi_status" unless there's a good reason not to, such as already having another one of those. Signed-off-by: Peter Jones --- lib/shell.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/shell.c') diff --git a/lib/shell.c b/lib/shell.c index 849f2660..224791a0 100644 --- a/lib/shell.c +++ b/lib/shell.c @@ -14,16 +14,17 @@ EFI_STATUS argsplit(EFI_HANDLE image, int *argc, CHAR16*** ARGV) { unsigned int i, count = 1; - EFI_STATUS status; + EFI_STATUS efi_status; EFI_LOADED_IMAGE *info; CHAR16 *start; *argc = 0; - status = uefi_call_wrapper(BS->HandleProtocol, 3, image, &LoadedImageProtocol, (VOID **) &info); - if (EFI_ERROR(status)) { + efi_status = uefi_call_wrapper(BS->HandleProtocol, 3, image, + &LoadedImageProtocol, (VOID **) &info); + if (EFI_ERROR(efi_status)) { Print(L"Failed to get arguments\n"); - return status; + return efi_status; } for (i = 0; i < info->LoadOptionsSize; i += 2) { -- cgit v1.2.3