[asterisk-commits] mmichelson: branch 1.6.0 r127567 - in /branches/1.6.0: ./ doc/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 2 16:10:00 CDT 2008


Author: mmichelson
Date: Wed Jul  2 16:10:00 2008
New Revision: 127567

URL: http://svn.digium.com/view/asterisk?view=rev&rev=127567
Log:
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.


........

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/doc/janitor-projects.txt

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/doc/janitor-projects.txt
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/doc/janitor-projects.txt?view=diff&rev=127567&r1=127566&r2=127567
==============================================================================
--- branches/1.6.0/doc/janitor-projects.txt (original)
+++ branches/1.6.0/doc/janitor-projects.txt Wed Jul  2 16:10:00 2008
@@ -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++)




More information about the asterisk-commits mailing list