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] [thread-next>] [day] [month] [year] [list]
Message-ID: <0bf36680-d659-9466-9634-92328d1be082@virtuozzo.com>
Date:   Tue, 14 Jul 2020 21:53:18 +0300
From:   Vasily Averin <vvs@...tuozzo.com>
To:     Miklos Szeredi <miklos@...redi.hu>
Cc:     linux-fsdevel@...r.kernel.org, Maxim Patlasov <maximvp@...il.com>,
        Kirill Tkhai <ktkhai@...tuozzo.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] fuse_writepages_fill: simplified "if-else if" constuction

On 7/14/20 3:24 PM, Miklos Szeredi wrote:
> On Thu, Jun 25, 2020 at 11:30 AM Vasily Averin <vvs@...tuozzo.com> wrote:
>>
>> fuse_writepages_fill uses following construction:
>> if (wpa && ap->num_pages &&
>>     (A || B || C)) {
>>         action;
>> } else if (wpa && D) {
>>         if (E) {
>>                 the same action;
>>         }
>> }
>>
>> - ap->num_pages check is always true and can be removed
>> - "if" and "else if" calls the same action and can be merged.
> 
> Makes sense.  Attached patch goes further and moves checking the
> conditions to a separate helper for clarity.

This looks perfect for me, thank you
	Vasily Averin


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ