Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Oct 2022 22:47:03 +0200
From:      Hans Petter Selasky <hselasky@freebsd.org>
To:        Jessica Clarke <jrtc27@freebsd.org>
Cc:        "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org>
Subject:   Re: git: 8f0a3c9c3551 - main - cuse(3): Use bool type for boolean value instead of int type.
Message-ID:  <db90bb94-5a90-dde0-8f1c-dcc8aa4d0d25@freebsd.org>
In-Reply-To: <DDAA2F55-07DA-449F-B5EB-E452C9578754@freebsd.org>
References:  <202210031536.293Favom085163@gitrepo.freebsd.org> <DDAA2F55-07DA-449F-B5EB-E452C9578754@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10/3/22 19:49, Jessica Clarke wrote:
> 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
> 

Feel free to fix it if you think it is worth a commit!

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?db90bb94-5a90-dde0-8f1c-dcc8aa4d0d25>