Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: cinergyT2: which kernel/usb module to use?
Johannes Stezenbach wrote:
Klaus Schmidinger wrote:
Anyway, is there anything actually _wrong_ with it?
No, logically it is correct.
Can you suggest a better way to do this?
Just for readability:
- remove the do {} while (0), it doesn't do anything
- instead of nested if's use a single if with &&ed conditions
I wasn't too fond of the orignal notation, either.
But right now I'm at other things and won't risk breaking this.
I suppose you won't change your coding style because of me, but the
single thing that gives me most headaches when reading VDR source is the
placement of the closing braces. IMHO it makes the block structure
unreadable. It confuses me that much that I have to rely on the
"highlight matching parenthesis" feature of my editor to read the code
correctly. I've never seen this indentation style elsewhere. I believe
even indent doesn't have an option to produce that style, which clearly
marks it as "highly unusual".
Well, the placement of the closing braces is apparently a major
philosophical issue ;-)
Personally I find that the closing brace _has_ to be indented, because
it is part of the "compound statement", which is, of course, indented.
I find something like
if (condition) {
some
statements
}
else {
some
more
statements
}
very ugly. To me
if (condition) {
some
statements
}
else {
some
more
statements
}
looks a lot "clearer". After all, nobody would write
1. This is the first topic
which consists of several
lines
2. And here's the second topic,
also consisting of several
lines
;-)
Klaus
Home |
Main Index |
Thread Index