projects
/
asterisk/asterisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76a2245
)
Update coding guidelines
author
Mark Spencer
<markster@digium.com>
Tue, 18 May 2004 05:52:52 +0000
(
05:52
+0000)
committer
Mark Spencer
<markster@digium.com>
Tue, 18 May 2004 05:52:52 +0000
(
05:52
+0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3000
65c4cc65
-6c06-0410-ace0-
fbb531ad65f3
doc/CODING-GUIDELINES
patch
|
blob
|
history
diff --git
a/doc/CODING-GUIDELINES
b/doc/CODING-GUIDELINES
index
04b5b38
..
fc66c64
100755
(executable)
--- a/
doc/CODING-GUIDELINES
+++ b/
doc/CODING-GUIDELINES
@@
-49,10
+49,25
@@
if (foo) {
Case statements:
switch (foo) {
- case BAR:
- blah();
- break;
- case OTHER:
- other();
- break;
+case BAR:
+ blah();
+ break;
+case OTHER:
+ other();
+ break;
+}
+
+No nested statements without braces, e.g. no:
+
+for (x=0;x<5;x++)
+ if (foo)
+ if (bar)
+ baz();
+
+instead do:
+for (x=0;x<5;x++) {
+ if (foo) {
+ if (bar)
+ baz();
+ }
}