git: 1b148ecb7433 - stable/15 - kern: change several int types to bools

Konstantin Belousov <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a8124a3.42471.9b8f886__41123.3215521619$1786848755$gmane$org@gitrepo.freebsd.org>
The branch stable/15 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=1b148ecb7433971dd31869cfd6d0c25f1bad85f7

commit 1b148ecb7433971dd31869cfd6d0c25f1bad85f7
Author:     Konstantin Belousov <[email protected]>
AuthorDate: 2026-07-15 17:01:20 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2026-08-16 02:41:31 +0000

    kern: change several int types to bools
    
    (cherry picked from commit 1f5fe8ad5293aad0308010d408dfdec6ab19e176)
---
 sys/kern/kern_exit.c    | 6 +++---
 sys/kern/sys_procdesc.c | 6 +++---
 sys/sys/procdesc.h      | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 8fcbea8f8cf8..603e9503a261 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -1183,7 +1183,7 @@ wait_fill_wrusage(struct proc *p, struct __wrusage *wrusage)
 static int
 proc_to_reap(struct thread *td, struct proc *p, idtype_t idtype, id_t id,
     int *status, int options, struct __wrusage *wrusage, siginfo_t *siginfo,
-    int check_only)
+    bool check_only)
 {
 	sx_assert(&proctree_lock, SA_XLOCKED);
 
@@ -1472,7 +1472,7 @@ loop_locked:
 	LIST_FOREACH(p, &q->p_children, p_sibling) {
 		pid = p->p_pid;
 		ret = proc_to_reap(td, p, idtype, id, status, options,
-		    wrusage, siginfo, 0);
+		    wrusage, siginfo, false);
 		if (ret == 0)
 			continue;
 		else if (ret != 1) {
@@ -1518,7 +1518,7 @@ loop_locked:
 	if (nfound == 0) {
 		LIST_FOREACH(p, &q->p_orphans, p_orphan) {
 			ret = proc_to_reap(td, p, idtype, id, NULL, options,
-			    NULL, NULL, 1);
+			    NULL, NULL, true);
 			if (ret != 0) {
 				KASSERT(ret != -1, ("reaped an orphan (pid %d)",
 				    (int)td->td_retval[0]));
diff --git a/sys/kern/sys_procdesc.c b/sys/kern/sys_procdesc.c
index ad2003051fd8..2a2be3f8ec69 100644
--- a/sys/kern/sys_procdesc.c
+++ b/sys/kern/sys_procdesc.c
@@ -278,7 +278,7 @@ procdesc_free(struct procdesc *pd)
  * We use the proctree_lock to ensure that process exit either happens
  * strictly before or strictly after a concurrent call to procdesc_close().
  */
-int
+bool
 procdesc_exit(struct proc *p)
 {
 	struct procdesc *pd;
@@ -308,7 +308,7 @@ procdesc_exit(struct proc *p)
 		pd->pd_proc = NULL;
 		p->p_procdesc = NULL;
 		procdesc_free(pd);
-		return (1);
+		return (true);
 	}
 	selwakeup(&pd->pd_selinfo);
 	KNOTE_LOCKED(&pd->pd_selinfo.si_note, NOTE_EXIT | NOTE_PDSIGCHLD);
@@ -316,7 +316,7 @@ procdesc_exit(struct proc *p)
 
 	/* Wakeup all waiters for this procdesc' process exit. */
 	wakeup(&p->p_procdesc);
-	return (0);
+	return (false);
 }
 
 void
diff --git a/sys/sys/procdesc.h b/sys/sys/procdesc.h
index 715232d5a00e..5ca93d3f4646 100644
--- a/sys/sys/procdesc.h
+++ b/sys/sys/procdesc.h
@@ -101,7 +101,7 @@ struct procdesc {
 /*
  * In-kernel interfaces to process descriptors.
  */
-int	 procdesc_exit(struct proc *);
+bool	 procdesc_exit(struct proc *);
 void	 procdesc_jobstate(struct proc *p);
 int	 kern_pdgetpid(struct thread *, int fd, const cap_rights_t *,
 	    pid_t *pidp);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.