On Thu, Jan 05, 2006 at 01:18:32PM -0500, Chuck Ebbert wrote:
> > - printk("\n");
> > + if (space == 0) {
> > + printk(" ");
> > + space = 1;
> > + } else {
> > + printk("\n");
> > + space = 0;
> > + }
>
> Why not:
>
> printk(space == 0 ? " " : "\n");
> space = !space;
readability ?
Personally, I despise the ternary operator, because it makes me
stop to try to parse it every time I see it. With the code I wrote
it's blindlingly obvious what is going on.
Dave
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]