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: <b2d3cc9e-86db-477e-afde-012a6f2fe493@vivo.com>
Date: Tue, 19 Aug 2025 10:16:51 +0000
From: 赵西超 <zhao.xichao@...o.com>
To: "Yuezhang.Mo@...y.com" <Yuezhang.Mo@...y.com>, "linkinjeon@...nel.org"
	<linkinjeon@...nel.org>, "sj1557.seo@...sung.com" <sj1557.seo@...sung.com>
CC: "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] exfat: drop redundant conversion to bool


>> The result of integer comparison already evaluates to bool. No need for
>> explicit conversion.
>>
>> No functional impact.
>>
>> Signed-off-by: Xichao Zhao <zhao.xichao@...o.com>
>> ---
>>   fs/exfat/inode.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/fs/exfat/inode.c b/fs/exfat/inode.c
>> index c10844e1e16c..f9501c3a3666 100644
>> --- a/fs/exfat/inode.c
>> +++ b/fs/exfat/inode.c
>> @@ -25,7 +25,7 @@ int __exfat_write_inode(struct inode *inode, int sync)
>>          struct super_block *sb = inode->i_sb;
>>          struct exfat_sb_info *sbi = EXFAT_SB(sb);
>>          struct exfat_inode_info *ei = EXFAT_I(inode);
>> -       bool is_dir = (ei->type == TYPE_DIR) ? true : false;
>> +       bool is_dir = (ei->type == TYPE_DIR);
>>          struct timespec64 ts;
>>
>>          if (inode->i_ino == EXFAT_ROOT_INO)
> The following two if statements both check whether the directory is the root.
> Can we remove the second if statement? I don't know its background.
>
>          if (inode->i_ino == EXFAT_ROOT_INO)
>                  return 0;
>
>          if (is_dir && ei->dir.dir == sbi->root_dir && ei->entry == -1)
>                  return 0;

I agree with your view.

Best regards,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ