git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
vserver 1.9.3
[linux-2.6.git]
/
Documentation
/
CodingStyle
diff --git
a/Documentation/CodingStyle
b/Documentation/CodingStyle
index
7b256c1
..
f25b395
100644
(file)
--- a/
Documentation/CodingStyle
+++ b/
Documentation/CodingStyle
@@
-356,10
+356,10
@@
Generally, inline functions are preferable to macros resembling functions.
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);
\
+ do_this(b,
c);
\
} while (0)
Things to avoid when using macros: