From eca818c872f7ad094f8dac143123e7e8d65f3bcc Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 24 Oct 2022 12:11:50 -0600 Subject: [PATCH] stand/efi: Simpler construct Use 'sizeof(long) == 8' for a compile time constant that can be used as an initializer rather than #ifdefs. Sponsored by: Netflix --- stand/efi/loader/bootinfo.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c index 38175bf10bc..afa24c12727 100644 --- a/stand/efi/loader/bootinfo.c +++ b/stand/efi/loader/bootinfo.c @@ -316,7 +316,7 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs) vm_offset_t size; char *rootdevname; int howto; - bool is64; + bool is64 = sizeof(long) == 8; #if defined(LOADER_FDT_SUPPORT) vm_offset_t dtbp; int dtb_size; @@ -336,12 +336,6 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs) #endif }; #endif -#ifdef __LP64__ - is64 = true; -#else - is64 = false; -#endif - howto = bi_getboothowto(args); /*