aboutsummaryrefslogtreecommitdiffstats
path: root/doc/CODING-GUIDELINES
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-07-10 23:58:07 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-07-10 23:58:07 +0000
commit195b213e41e1026b393322e7581ea5fdf3520183 (patch)
treebe9af2048e93c4bc34ec1b72348006cb1f115c47 /doc/CODING-GUIDELINES
parentcf7dd25e0435e61ecd0dfc2897a4b413e3b7442b (diff)
more thoughts
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6078 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'doc/CODING-GUIDELINES')
-rwxr-xr-xdoc/CODING-GUIDELINES10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/CODING-GUIDELINES b/doc/CODING-GUIDELINES
index 29b370378..7b27f5375 100755
--- a/doc/CODING-GUIDELINES
+++ b/doc/CODING-GUIDELINES
@@ -218,6 +218,16 @@ API call somewhere. If you are duplicating functionality found in
another static function, consider the value of creating a new API call
which can be shared.
+As a common example of this point, make an effort to use the lockable
+linked-list macros found in include/asterisk/linkedlists.h. They are
+efficient, easy to use and provide every operation that should be
+necessary for managing a singly-linked list (if something is missing,
+let us know!). Just because you see other open-coded list implementations
+in the source tree is no reason to continue making new copies of
+that code... There are also a number of common string manipulation
+and timeval manipulation functions in asterisk/strings.h and asterisk/time.h;
+use them when possible.
+
When you achieve your desired functionalty, make another few refactor
passes over the code to optimize it.