Coding style: do_this(a,b) vs. do_this(a, b)
Hi!
Coding style document is not consistent with itself on whether there should be space after ","... This makes it standartize on ", " option.
Pavel
Documentation/CodingStyle renamed from linux/Documentation/CodingStyle +3 -3
@@ -356,11 +356,11 @@ Macros with multiple statements should be enclosed in a do - while block: -#define macrofun(a,b,c) \ +#define macrofun(a, b, c) \ do { \ if (a == 5) \ - do_this(b,c); \ - } while (0) + do_this(b, c); \ + } while(0) Things to avoid when using macros:
Signature · 2 lines
People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
Speaking of style preferences, does anybody else feel that there are too many spaces in the indentations? I personally prefer no more than two or three spaces, as I can fit a lot more code per line that way.
Signature · 1 line
Sean
Hi!
Quoted 3 lines
Speaking of style preferences, does anybody else feel that there are too many spaces in the indentations? I personally prefer no more than two or three spaces, as I can fit a lot more code per line that way.
Better not start *that* flamewar.
[Its on purpose, see archives.]
Pavel
Signature · 2 lines
People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
Documentation/CodingStyle line 363
Quoted 4 lines · Pavel Machek
Hi!
Documentation/CodingStyle renamed from linux/Documentation/CodingStyle +1
-1- } while (0) + } while(0)
"while" is not a function so I'd keep the space. Both coding style and kernel/*.c (had to pick something) seem to agree upon this: put a space between keyword and expression.
Signature · 1 line
Frank
Quoted 8 lines · Frank van Maarseveen
Documentation/CodingStyle line 363
Quoted 4 lines · Pavel Machek
Hi!
Documentation/CodingStyle renamed from linux/Documentation/CodingStyle +1
-1- } while (0) + } while(0)"while" is not a function so I'd keep the space.
My stealth error corrector already did that ;)