summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-05-18 05:52:52 +0000
committerMark Spencer <markster@digium.com>2004-05-18 05:52:52 +0000
commit99876da3808d5050d1f7ee821175ed92a96b93a6 (patch)
tree4e206cee5f5f3224c21479d23ef5ecc5505d014f /doc
parent76a22457ceb36d8b903dab296246e8731a297229 (diff)
Update coding guidelines
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/CODING-GUIDELINES27
1 files changed, 21 insertions, 6 deletions
diff --git a/doc/CODING-GUIDELINES b/doc/CODING-GUIDELINES
index 04b5b38d9..fc66c64e9 100755
--- 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();
+ }
}