Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Nov 2021 00:04:33 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 4082b189d2ce - main - elf*_brand_inuse: Change return type to bool.
Message-ID:  <202111180004.1AI04XXP054704@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 *);



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