Re: git: 8f0a3c9c3551 - main - cuse(3): Use bool type for boolean value instead of int type.

From: Jessica Clarke <jrtc27_at_freebsd.org>
Date: Mon, 03 Oct 2022 17:49:24 UTC
On 3 Oct 2022, at 16:36, Hans Petter Selasky <hselasky@FreeBSD.org> wrote:
> 
> The branch main has been updated by hselasky:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=8f0a3c9c35517e61f4f64ce5b252202b8ddfa313
> 
> commit 8f0a3c9c35517e61f4f64ce5b252202b8ddfa313
> Author:     Hans Petter Selasky <hselasky@FreeBSD.org>
> AuthorDate: 2022-10-03 15:26:43 +0000
> Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
> CommitDate: 2022-10-03 15:35:14 +0000
> 
>    cuse(3): Use bool type for boolean value instead of int type.
> 
>    No functional change intended.
> 
>    Reviewed by:    imp @
>    Differential Revision:  https://reviews.freebsd.org/D36633
>    MFC after:      1 week
>    Sponsored by:   NVIDIA Networking
> ---
> sys/fs/cuse/cuse.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/sys/fs/cuse/cuse.c b/sys/fs/cuse/cuse.c
> index 62b53d232ee2..a870df1b07dc 100644
> --- a/sys/fs/cuse/cuse.c
> +++ b/sys/fs/cuse/cuse.c
> @@ -822,7 +822,7 @@ cuse_server_write(struct cdev *dev, struct uio *uio, int ioflag)
> static int
> cuse_server_ioctl_copy_locked(struct cuse_server *pcs,
>     struct cuse_client_command *pccmd,
> -    struct cuse_data_chunk *pchk, int isread)
> +    struct cuse_data_chunk *pchk, bool isread)
> {
> 	struct proc *p_proc;
> 	uint32_t offset;
> @@ -850,7 +850,7 @@ cuse_server_ioctl_copy_locked(struct cuse_server *pcs,
> 
> 	cuse_server_unlock(pcs);
> 
> -	if (isread == 0) {
> +	if (isread == false) {

!isread? (also below)

Jess

> 		error = copyin(
> 		    (void *)pchk->local_ptr,
> 		    pccmd->client->ioctl_buffer + offset,
> @@ -929,7 +929,7 @@ cuse_proc2proc_copy(struct proc *proc_s, vm_offset_t data_s,
> static int
> cuse_server_data_copy_locked(struct cuse_server *pcs,
>     struct cuse_client_command *pccmd,
> -    struct cuse_data_chunk *pchk, int isread)
> +    struct cuse_data_chunk *pchk, bool isread)
> {
> 	struct proc *p_proc;
> 	int error;
> @@ -945,7 +945,7 @@ cuse_server_data_copy_locked(struct cuse_server *pcs,
> 
> 	cuse_server_unlock(pcs);
> 
> -	if (isread == 0) {
> +	if (isread == false) {
> 		error = cuse_proc2proc_copy(
> 		    curthread->td_proc, pchk->local_ptr,
> 		    p_proc, pchk->peer_ptr,


Jess