From b49dd00f8c13fc32250981a0508adc4dddf06a08 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 22 Oct 2018 13:32:59 +0200 Subject: [PATCH] efi: add simple macros for MAX values of EFI's UINTN/INTN types --- src/boot/efi/util.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/boot/efi/util.h b/src/boot/efi/util.h index daa386b7696..169bd674d33 100644 --- a/src/boot/efi/util.h +++ b/src/boot/efi/util.h @@ -52,3 +52,6 @@ static inline void FileHandleClosep(EFI_FILE_HANDLE *handle) { } const EFI_GUID loader_guid; + +#define UINTN_MAX (~(UINTN)0) +#define INTN_MAX ((INTN)(UINTN_MAX>>1))