lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210510133835.GU7604@twin.jikos.cz>
Date:   Mon, 10 May 2021 15:38:35 +0200
From:   David Sterba <dsterba@...e.cz>
To:     Johannes Thumshirn <Johannes.Thumshirn@....com>
Cc:     Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
        "clm@...com" <clm@...com>,
        "josef@...icpanda.com" <josef@...icpanda.com>,
        "dsterba@...e.com" <dsterba@...e.com>,
        "linux-btrfs@...r.kernel.org" <linux-btrfs@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] btrfs: Assign boolean values to a bool variable

On Mon, May 10, 2021 at 09:37:58AM +0000, Johannes Thumshirn wrote:
> On 04/03/2021 02:51, Jiapeng Chong wrote:
> > Fix the following coccicheck warnings:
> > 
> > ./fs/btrfs/volumes.c:1462:10-11: WARNING: return of 0/1 in function
> > 'dev_extent_hole_check_zoned' with return type bool.
> > 
> > Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> > Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
> > ---
> >  fs/btrfs/volumes.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> > index bc3b33e..995920f 100644
> > --- a/fs/btrfs/volumes.c
> > +++ b/fs/btrfs/volumes.c
> > @@ -1458,8 +1458,8 @@ static bool dev_extent_hole_check_zoned(struct btrfs_device *device,
> >  		/* Given hole range was invalid (outside of device) */
> >  		if (ret == -ERANGE) {
> >  			*hole_start += *hole_size;
> > -			*hole_size = 0;
> > -			return 1;
> > +			*hole_size = false;
> 
> 
> Erm, hole_size is u64 and not bool

Thanks for catching it, I should have spotted that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ