aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-02 21:10:00 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-02 21:10:00 +0000
commit90f48831f0568d52baf2913e25551f03702faaf9 (patch)
tree007bad16fde27db0108448760430dd66482b0b93 /doc
parentee9e6c1a880e35ab7ede2e5f0850815d9136a8f7 (diff)
Merged revisions 127566 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r127566 | mmichelson | 2008-07-02 16:09:18 -0500 (Wed, 02 Jul 2008) | 4 lines Add a janitor project to use ARRAY_LEN instead of in-line sizeof() and division. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@127567 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'doc')
-rw-r--r--doc/janitor-projects.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/janitor-projects.txt b/doc/janitor-projects.txt
index 237017633..839d57945 100644
--- a/doc/janitor-projects.txt
+++ b/doc/janitor-projects.txt
@@ -28,3 +28,11 @@
-- Audit all channel/res/app/etc. modules to ensure that they do not register any entrypoints with the Asterisk core until after they are ready to service requests; all config file reading/processing, structure allocation, etc. must be completed before Asterisk is made aware of any services the module offers.
-- Ensure that Realtime-enabled modules do not depend on the order of columns returned by the database lookup (example: outboundproxy and host settings in chan_sip).
+
+ -- There are several places in the code where the length of arrays is calculated in-line with sizeof() and division. A common place to find this is in for loops, like this:
+
+ for (i = 0; i < sizeof(array)/sizeof(array[0]); i++)
+
+ There is a macro in utils.h called ARRAY_LEN which should be used instead for readability's sake.
+
+ for (i = 0; i < ARRAY_LEN(array); i++)