[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1397688476.3105.13.camel@joe-AO725>
Date: Wed, 16 Apr 2014 15:47:56 -0700
From: Joe Perches <joe@...ches.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Fabian Frederick <fabf@...net.be>,
linux-kernel <linux-kernel@...r.kernel.org>,
hch <hch@...radead.org>
Subject: Re: [PATCH 1/1] fs/xfs/xfs_log.c: Fix comparison to bool
On Wed, 2014-04-16 at 15:15 -0700, Andrew Morton wrote:
> On Sun, 13 Apr 2014 22:09:17 +0200 Fabian Frederick <fabf@...net.be> wrote:
> > Fixing coccinelle warning
[]
> > @@ -2376,7 +2376,7 @@ next_lv:
[]
> > - if (record_cnt == 0 && ordered == false) {
> > + if (record_cnt == 0 && !ordered) {
[]
> There was nothing wrong with that code. I suspect coccinelle bustage.
Not really.
It's more a conceit that consistent uses of direct
boolean variable tests are less likely to be error
prone than variable comparisons to boolean literals.
Many style guides, CodingStyle not included, suggest
avoiding comparisons to boolean literals.
There is a checkpatch --strict message when comparing
a literal true/false.
I tend not to change these unless there are multiple
styles in the same subsystem/file.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists