git: daeb975ff570 - main - efivar: Use bool instead of int
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 01 May 2025 18:06:44 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=daeb975ff5704eabad4487b6afa94bd14043191b
commit daeb975ff5704eabad4487b6afa94bd14043191b
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2025-05-01 17:53:53 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-05-01 17:55:14 +0000
efivar: Use bool instead of int
Sponsored by: Netflix
Reviewed by: tsoome, kib
Differential Revision: https://reviews.freebsd.org/D50059
---
lib/libefivar/efivar.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/libefivar/efivar.c b/lib/libefivar/efivar.c
index b380ae285831..03efb3c5226a 100644
--- a/lib/libefivar/efivar.c
+++ b/lib/libefivar/efivar.c
@@ -29,6 +29,7 @@
#include <sys/param.h>
#include <errno.h>
#include <fcntl.h>
+#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -83,7 +84,7 @@ efi_guid_tbl_compile(void)
{
size_t i;
uint32_t status;
- static int done = 0;
+ static bool done = false;
if (done)
return;
@@ -95,7 +96,7 @@ efi_guid_tbl_compile(void)
fprintf(stderr, "Can't convert %s to a uuid for %s: %d\n",
guid_tbl[i].uuid_str, guid_tbl[i].name, (int)status);
}
- done = 1;
+ done = true;
}
int