On Mon, May 10, 2010 at 09:38:26AM +0200, Johannes Berg wrote:
> On Sat, 2010-05-08 at 18:22 +0200, Dan Carpenter wrote:
>
> > + bool on = param ? 1 : 0;
>
> umm, if you're going to use bool then use true/false too.
>
> johannes
The 1 and 0 are used as array indexes so it looks funny to use true and
false.
Let's just drop this patch. I wrote it to silence a smatch false
positive but I should/will just fix smatch instead.
Smatch complains we negate a non-boolean type here:
if (!on != aniState->ofdmWeakSigDetectOff) {
It's a quite common bug to forget that negation has higher precendence
than compare operations. In this case, it's clear from code that "on" is
either 1 or 0 so smatch should not complain.
regards,
dan carpenter
_______________________________________________
ath9k-devel mailing list
[email protected]
https://lists.ath9k.org/mailman/listinfo/ath9k-devel