stand: Use bool for stage_offset_set

stage_offset_set is a boolean, convert it to a bool.

Sponsored by:		Netflix
This commit is contained in:
Warner Losh 2022-08-21 09:45:44 -06:00
parent 9d54812421
commit 9d70108a74

View File

@ -200,7 +200,7 @@ efi_verify_staging_size(unsigned long *nr_pages)
static u_long staging_slop = EFI_STAGING_SLOP; static u_long staging_slop = EFI_STAGING_SLOP;
EFI_PHYSICAL_ADDRESS staging, staging_end, staging_base; EFI_PHYSICAL_ADDRESS staging, staging_end, staging_base;
int stage_offset_set = 0; bool stage_offset_set = false;
ssize_t stage_offset; ssize_t stage_offset;
static void static void
@ -208,7 +208,7 @@ efi_copy_free(void)
{ {
BS->FreePages(staging_base, (staging_end - staging_base) / BS->FreePages(staging_base, (staging_end - staging_base) /
EFI_PAGE_SIZE); EFI_PAGE_SIZE);
stage_offset_set = 0; stage_offset_set = false;
stage_offset = 0; stage_offset = 0;
} }
@ -478,7 +478,7 @@ efi_copyin(const void *src, vm_offset_t dest, const size_t len)
if (!stage_offset_set) { if (!stage_offset_set) {
stage_offset = (vm_offset_t)staging - dest; stage_offset = (vm_offset_t)staging - dest;
stage_offset_set = 1; stage_offset_set = true;
} }
/* XXX: Callers do not check for failure. */ /* XXX: Callers do not check for failure. */
@ -509,7 +509,7 @@ efi_readin(readin_handle_t fd, vm_offset_t dest, const size_t len)
if (!stage_offset_set) { if (!stage_offset_set) {
stage_offset = (vm_offset_t)staging - dest; stage_offset = (vm_offset_t)staging - dest;
stage_offset_set = 1; stage_offset_set = true;
} }
if (!efi_check_space(dest + stage_offset + len)) { if (!efi_check_space(dest + stage_offset + len)) {