git: 39cfd1380a64 - stable/13 - stand: Use bool for stage_offset_set
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 24 Jan 2023 22:12:12 UTC
The branch stable/13 has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=39cfd1380a642d1c3d511847a890e59e9dbf4469
commit 39cfd1380a642d1c3d511847a890e59e9dbf4469
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-08-21 15:45:44 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-01-24 21:49:32 +0000
stand: Use bool for stage_offset_set
stage_offset_set is a boolean, convert it to a bool.
Sponsored by: Netflix
(cherry picked from commit 9d70108a74efe327ed9d1f68bc1e9e271810d94c)
---
stand/efi/loader/copy.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/stand/efi/loader/copy.c b/stand/efi/loader/copy.c
index 980345b979f6..d7ca5513516b 100644
--- a/stand/efi/loader/copy.c
+++ b/stand/efi/loader/copy.c
@@ -200,7 +200,7 @@ out:
static u_long staging_slop = EFI_STAGING_SLOP;
EFI_PHYSICAL_ADDRESS staging, staging_end, staging_base;
-int stage_offset_set = 0;
+bool stage_offset_set = false;
ssize_t stage_offset;
static void
@@ -208,7 +208,7 @@ efi_copy_free(void)
{
BS->FreePages(staging_base, (staging_end - staging_base) /
EFI_PAGE_SIZE);
- stage_offset_set = 0;
+ stage_offset_set = false;
stage_offset = 0;
}
@@ -478,7 +478,7 @@ efi_copyin(const void *src, vm_offset_t dest, const size_t len)
if (!stage_offset_set) {
stage_offset = (vm_offset_t)staging - dest;
- stage_offset_set = 1;
+ stage_offset_set = true;
}
/* 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) {
stage_offset = (vm_offset_t)staging - dest;
- stage_offset_set = 1;
+ stage_offset_set = true;
}
if (!efi_check_space(dest + stage_offset + len)) {