Re: [PATCH] only use 48-bit lba when necessary

Chuck Ebbert (76306.1226@compuserve.com)
Fri, 4 Apr 2003 12:02:00 -0500


Juan Quintela wrote:

>Reason is that:
>
>if (expr)
> var = true;
>else
> var = false;
>
>is always a bad construct.
>
>var = expr;
>
>is a better construct to express that meaning.

Yes, but:

if (expr1 && expr2)
var = true;
else
var = false;

is usually better turned into something that avoids jumps
when it's safe to evaluate both parts unconditionally:

var = (expr1 != 0) & (expr2 != 0);

or (if you can stand it):

var = !!expr1 & !!expr2;

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