Re: [PATCH] checkpatch: Warn on comparisons to true and false

From: Andrew Morton
Date: Wed Apr 10 2013 - 18:58:13 EST


On Tue, 09 Apr 2013 20:17:14 -0700 Joe Perches <joe@xxxxxxxxxxx> wrote:

> Comparisons of A to true and false are better written
> as A and !A.
>
> Bleat a message on use.

hm. I'm counting around 1,100 instances of "== true" and "== false".

That's a lot of people to shout at. Is it really worthwhile?
"foo==true" is a bit of a waste of space but I can't say that I find it
terribly offensive.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/