Re: drivers: Probable misuses of ||

From: Alan Cox
Date: Fri May 04 2012 - 18:53:53 EST


On Fri, 04 May 2012 14:54:37 -0700
Joe Perches <joe@xxxxxxxxxxx> wrote:

> On Wed, 2012-04-04 at 16:00 -0700, Joe Perches wrote:
> > Likely these should be && not ||
> >
> > drivers/scsi/FlashPoint.c: if(bit_cnt != 0 || bit_cnt != 8)
>
> It's been a month.
>
> Do you maintainers not care about these obvious defects?

You are assuming the code in question has maintainers. FlashPoint hasn't
really had a maintainer since Leonard died. Also given it's been like
that for approaching twenty years and works there is a real danger in
changing it unless the patch is tested carefully - if you can find anyone
with the hardware.

It's not unknown for code to work *because* it is wrong.

Alan
--
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/