Messages in this thread |  | | Subject | Re: [PATCH 1/1] fs/xfs/xfs_log.c: Fix comparison to bool | | From | Joe Perches <> | | Date | Wed, 16 Apr 2014 15:47:56 -0700 |
| |
On Wed, 2014-04-16 at 15:15 -0700, Andrew Morton wrote: > On Sun, 13 Apr 2014 22:09:17 +0200 Fabian Frederick <fabf@skynet.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.
|  |