diff options
author | xypron.glpk@gmx.de | 2017-08-17 18:57:36 +0200 |
---|---|---|
committer | Alexander Graf | 2017-08-18 10:53:23 +0200 |
commit | c81883dfce7360148c72922b93bfa16b399ee3ee (patch) | |
tree | 7c9702a278c25e56223e58cb4ed1c31c4dec0767 /include | |
parent | a44bffcc9557cf5f761a43bce44a59fa85feab2a (diff) |
efi_loader: do not cast return value in EFI_EXIT
UEFI API functions have different return types.
Some return a value of type EFI_STATUS other don't.
We therefore should not cast the return value of EFI_EXIT
to another type than the expression passed to EFI_EXIT.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/efi_loader.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h index 037cc7c5434..1179234f683 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -33,9 +33,9 @@ const char *__efi_nesting_dec(void); * Exit the u-boot world back to UEFI: */ #define EFI_EXIT(ret) ({ \ - efi_status_t _r = ret; \ + typeof(ret) _r = ret; \ debug("%sEFI: Exit: %s: %u\n", __efi_nesting_dec(), \ - __func__, (u32)(_r & ~EFI_ERROR_MASK)); \ + __func__, (u32)((uintptr_t) _r & ~EFI_ERROR_MASK)); \ assert(__efi_exit_check()); \ _r; \ }) |