Re: drivers/char/sysrq.c

From: Valdis . Kletnieks (Valdis.Kletnieks@vt.edu)
Date: Fri May 30 2003 - 22:21:24 EST


On Fri, 30 May 2003 18:11:49 +0200, margitsw@xxxxxxxxxxx (Margit Schubert-While) said:
> I wonder if there are other places where "&" (or "|") is coded and
> "&&" (or "||") is meant (or vice-versa) where the result is NOT semantically
> the same :-)
> It'll take a good checker to sort that one!

It shouldn't be hard at all to deal with the form:

(A compare B) op (C compare D)

The scary part would be if the right-hand size has a side-effect - then
the choice of |, & over ||, && would definitely be bug-inducing (or possibly
bug-fixing)?

Attachment: pgp00001.pgp
Description: PGP signature