[Home]

Summary:ASTERISK-12322: [patch] janitor task to substitute in-line sizeof() for array_len to calculate the length of arrays
Reporter:Caio Begotti (caio1982)Labels:
Date Opened:2008-07-06 14:22:51Date Closed:2008-07-08 11:33:54
Priority:MinorRegression?No
Status:Closed/CompleteComponents:General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) janitor_arraylen5.diff
Description:Just noticed this new dirty janitor job in doc/janitor-projects.txt. Maybe there are still some missing statements out there but these were the easy ones to find and I also took advantage of the cleanup and add some if braces.
Comments:By: Michiel van Baak (mvanbaak) 2008-07-06 14:56:19

great job.
It's funny to see you added a lot of braces to chan_iax2.c but forgot to do so for some of the for statements you actually altered to use ARRAY_LEN
And some places where you have:
for (.... ARRAY_LEN....) {
 if ()
   statement()


Just something I noticed. And because you mentioned the braces thing in the report ...

By: Caio Begotti (caio1982) 2008-07-06 14:58:59

I just added them randomly where the if's had more then one line of statement, I didn't want to be pedantic changing everything possible :-)

By: Digium Subversion (svnbot) 2008-07-08 11:33:23

Repository: asterisk
Revision: 129045

U   trunk/apps/app_adsiprog.c
U   trunk/apps/app_meetme.c
U   trunk/apps/app_parkandannounce.c
U   trunk/channels/chan_dahdi.c
U   trunk/channels/chan_iax2.c
U   trunk/channels/chan_sip.c
U   trunk/channels/h323/ast_h323.cxx
U   trunk/channels/iax2-provision.c
U   trunk/formats/format_pcm.c
U   trunk/main/acl.c
U   trunk/main/callerid.c
U   trunk/main/channel.c
U   trunk/main/frame.c
U   trunk/main/logger.c
U   trunk/main/manager.c
U   trunk/main/pbx.c
U   trunk/main/rtp.c
U   trunk/pbx/dundi-parser.c
U   trunk/res/res_limit.c

------------------------------------------------------------------------
r129045 | bbryant | 2008-07-08 11:33:13 -0500 (Tue, 08 Jul 2008) | 7 lines

Janitor project to convert sizeof to ARRAY_LEN macro.

(closes issue ASTERISK-12322)
Reported by: caio1982
Patches:
     janitor_arraylen5.diff uploaded by caio1982 (license 22)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=129045