lkml.org 
[lkml]   [2003]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] only use 48-bit lba when necessary
Date
> > 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;
>
> Yes, but mine is more readable. IMO of course, that's the way it is with
> styles.

if (!expr || expr) var=(!expr ? !expr : expr);

:-)

John.
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.023 / U:1.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site