Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1619855

Re: [PATCH] net: netfilter: Replace explicit NULL comparisons

From Pablo Neira Ayuso <pablo@netfilter.org>
Newsgroups linux.kernel
Subject Re: [PATCH] net: netfilter: Replace explicit NULL comparisons
Date 2017-04-10 14:00 +0200
Message-ID <tuG9b-av-9@gated-at.bofh.it> (permalink)
References <tu2lr-8cD-1@gated-at.bofh.it> <tu3hv-oq-1@gated-at.bofh.it> <tu4ZX-1w6-5@gated-at.bofh.it> <tugop-o3-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, Apr 09, 2017 at 09:12:18AM +0530, Arushi Singhal wrote:
> On Sun, Apr 9, 2017 at 1:44 AM, Pablo Neira Ayuso <pablo@netfilter.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.

I don't find it in the coding style. I think this is what it stands as
preference in this case IMO. Otherwise, it would be good to get the
kernel coding style document in sync with it, including the reason why
this way to express thing is cleaner. We have to justify the changes.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] net: netfilter: Replace explicit NULL comparisons Arushi Singhal <arushisinghal19971997@gmail.com> - 2017-04-08 19:30 +0200
  Re: [PATCH] net: netfilter: Replace explicit NULL comparisons Jan Engelhardt <jengelh@inai.de> - 2017-04-08 20:30 +0200
    Re: [PATCH] net: netfilter: Replace explicit NULL comparisons Pablo Neira Ayuso <pablo@netfilter.org> - 2017-04-08 22:20 +0200
      Re: [PATCH] net: netfilter: Replace explicit NULL comparisons Jan Engelhardt <jengelh@inai.de> - 2017-04-09 10:30 +0200
        Re: [PATCH] net: netfilter: Replace explicit NULL comparisons Liping Zhang <zlpnobody@gmail.com> - 2017-04-09 11:40 +0200
      Re: [PATCH] net: netfilter: Replace explicit NULL comparisons Pablo Neira Ayuso <pablo@netfilter.org> - 2017-04-10 14:00 +0200

csiph-web