Re: drivers/char/sysrq.c

Jörn Engel (joern@wohnheim.fh-wedel.de)
Fri, 30 May 2003 16:58:51 +0200


On Fri, 30 May 2003 16:44:55 +0200, Margit Schubert-While wrote:
>
> In drivers/char/sysrq.c (2.4 and 2.5) we have :
>
> if ((key >= '0') & (key <= '9')) {
> retval = key - '0';
> } else if ((key >= 'a') & (key <= 'z')) {
>
> Shouldn't the "&" be (pedantically) "&&" ?

It is semantically the same. If you can show that gcc optimization
also creates the same assembler code, few people will object to a
patch.

Jörn

-- 
Measure. Don't tune for speed until you've measured, and even then
don't unless one part of the code overwhelms the rest.
-- Rob Pike
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/