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: <CAML_gOeX=c9AxpuFBGes_ogQSZe+s1Rg3-rBL1Q4RX9Gv5hcZg@mail.gmail.com>
Date:   Sun, 9 Apr 2017 17:36:22 +0800
From:   Liping Zhang <zlpnobody@...il.com>
To:     Jan Engelhardt <jengelh@...i.de>
Cc:     Arushi Singhal <arushisinghal19971997@...il.com>,
        Pablo Neira Ayuso <pablo@...filter.org>,
        Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>,
        "David S. Miller" <davem@...emloft.net>,
        Netfilter Developer Mailing List 
        <netfilter-devel@...r.kernel.org>, coreteam@...filter.org,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: netfilter: Replace explicit NULL comparisons

2017-04-09 16:26 GMT+08:00 Jan Engelhardt <jengelh@...i.de>:
>
> On Sunday 2017-04-09 05:42, Arushi Singhal wrote:
>>On Sun, Apr 9, 2017 at 1:44 AM, Pablo Neira Ayuso <pablo@...filter.org> wrote:
>>      On Sat, Apr 08, 2017 at 08:21:56PM +0200, Jan Engelhardt wrote:
>>      > On Saturday 2017-04-08 19:21, Arushi Singhal wrote:
>>      >
>>      > >Replace explicit NULL comparison with ! operator to simplify code.
>>      >
>>      > I still wouldn't do this, for the same reason as before. Comparing to
>>      > NULL explicitly more or less gave an extra guarantee that the other
>>      > operand was also a pointer.
>>
>>      Arushi, where does it say in the coding style that this is prefered?
>>
>>This is reported by checkpatch.pl script.
>
> checkpatch has been controversial at times, like when people took the 80
> character limit way too literally. Changing pointer comparisons looks like
> another thing that is better left ignored.

Yes, I agree too. Converting the "if (p != NULL)" to "if (p)" like this seems
unnecessary.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ