Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jan 2023 22:12:55 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: cc56d139e936 - stable/13 - stand/efi: Simpler construct
Message-ID:  <202301242212.30OMCtjw087696@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=cc56d139e936135ed9077b4aa459dc5ab4d0d049

commit cc56d139e936135ed9077b4aa459dc5ab4d0d049
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-10-24 18:11:50 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-01-24 21:49:36 +0000

    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
    
    (cherry picked from commit eca818c872f7ad094f8dac143123e7e8d65f3bcc)
---
 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 99045735e7bb..c5f0291c9e6e 100644
--- a/stand/efi/loader/bootinfo.c
+++ b/stand/efi/loader/bootinfo.c
@@ -318,7 +318,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;
@@ -338,12 +338,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);
 
 	/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202301242212.30OMCtjw087696>