git: 4082b189d2ce - main - elf*_brand_inuse: Change return type to bool.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 18 Nov 2021 00:04:33 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=4082b189d2ce00674439226c9d5a8bdcafd23d01
commit 4082b189d2ce00674439226c9d5a8bdcafd23d01
Author: Alex Richardson <arichardson@FreeBSD.org>
AuthorDate: 2021-11-17 23:51:40 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2021-11-17 23:51:40 +0000
elf*_brand_inuse: Change return type to bool.
Reviewed by: kib
Obtained from: CheriBSD
Sponsored by: The University of Cambridge, Google Inc.
Differential Revision: https://reviews.freebsd.org/D33052
---
sys/kern/imgact_elf.c | 6 +++---
sys/sys/imgact_elf.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index 0751c25bd47d..c7c131da184c 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -302,16 +302,16 @@ __elfN(remove_brand_entry)(Elf_Brandinfo *entry)
return (0);
}
-int
+bool
__elfN(brand_inuse)(Elf_Brandinfo *entry)
{
struct proc *p;
- int rval = FALSE;
+ bool rval = false;
sx_slock(&allproc_lock);
FOREACH_PROC_IN_SYSTEM(p) {
if (p->p_sysent == entry->sysvec) {
- rval = TRUE;
+ rval = true;
break;
}
}
diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h
index 294f17c87b6f..67b95207ec33 100644
--- a/sys/sys/imgact_elf.h
+++ b/sys/sys/imgact_elf.h
@@ -112,7 +112,7 @@ struct sseg_closure {
size_t size; /* Total size of all writable segments. */
};
-int __elfN(brand_inuse)(Elf_Brandinfo *entry);
+bool __elfN(brand_inuse)(Elf_Brandinfo *entry);
int __elfN(insert_brand_entry)(Elf_Brandinfo *entry);
int __elfN(remove_brand_entry)(Elf_Brandinfo *entry);
int __elfN(freebsd_fixup)(uintptr_t *, struct image_params *);