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

Juan Quintela (quintela@mandrakesoft.com)
Fri, 04 Apr 2003 17:48:20 +0200


Hi

jens> + if (drive->addressing == 1 && block > 0xfffffff)
jens> + lba48 = 1;
jens> +
>>
>> lba48 = (drive->addressing == 1) && (block > 0xfffffff);
>>
>> should do the trick.

jens> I'm not going to use such nonsense, sorry. The spelled out versions are
jens> a lot more readable. The command ?: constructs used in ide-disk are a
jens> joke, imo.

Read it again, please. Told me wehre are the ?: command.

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.

And yes, your is a variation of the same theme:

var = false;
if (expr)
var = true;

Later, Juan "who also didn't like ?: operator"

-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy
-
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/