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: <DB6P189MB0568A487A016FBA45DF108A89C959@DB6P189MB0568.EURP189.PROD.OUTLOOK.COM>
Date:   Mon, 17 Apr 2023 14:22:36 +0000
From:   David Binderman <dcb314@...mail.com>
To:     Peng Zhang <zhangpeng.00@...edance.com>
CC:     "Liam.Howlett@...cle.com" <Liam.Howlett@...cle.com>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "maple-tree@...ts.infradead.org" <maple-tree@...ts.infradead.org>
Subject: Re: linux-6.3-rc6/lib/maple_tree.c: Two style issues

Hello there,

>It should be fine here. 

Perhaps I have been slightly less than clear. The discussion is about the *style*
of the code, *not* whether it works or not. My apologies for the lack of clarity. 

Expression is

    while (A &&
        B && C)

The static analyser notices it is poor style to have B do a limit check, but have A use it.
Sure its working code, but suggest new code

    while (B && A && C)

It won't make much difference to the code, it will merely be better style.

2.

>> Source code is
>>
>>             memset(pivs + tmp, 0,
>>                     sizeof(unsigned long *) * (max_p - tmp));

>It's not good here, I can fix it.

sizeof( pivs[ 0]) is a better thing to say than sizeof( unsigned long). 
There is reduced future maintenance burden, when the type of *pivs changes.

Regards

David Binderman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ