diff options
author | Mark Spencer <markster@digium.com> | 2004-05-18 05:52:52 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2004-05-18 05:52:52 +0000 |
commit | 99876da3808d5050d1f7ee821175ed92a96b93a6 (patch) | |
tree | 4e206cee5f5f3224c21479d23ef5ecc5505d014f /doc | |
parent | 76a22457ceb36d8b903dab296246e8731a297229 (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-x | doc/CODING-GUIDELINES | 27 |
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(); + } } |