[Home]

Summary:ASTERISK-13177: [patch] Janitor project to use ARRAY_LEN
Reporter:Brandon Kruse (bkruse)Labels:
Date Opened:2008-12-08 16:36:35.000-0600Date Closed:2008-12-09 19:09:33.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 14032.patch
Description:Noticed this in doc/janitor-projects.txt

Uploaded a patch, also, a sed one liner for finding and fixing these.

For example:

sed 's/sizeof(\(.*\))\/sizeof(.*\[0\])/ARRAY_LEN(\1)/g' doc/janitor-projects.txt

-bk
Comments:By: Brandon Kruse (bkruse) 2008-12-08 16:37:39.000-0600

I am not 100% sure (my C skills are not amazing) if you still have to cast the ARRAY_LEN macro to int (eg (int)ARRAY_LEN(cmds)

-bk

By: Digium Subversion (svnbot) 2008-12-09 19:09:32.000-0600

Repository: asterisk
Revision: 162542

U   trunk/apps/app_voicemail.c
U   trunk/channels/iax2-parser.c
U   trunk/doc/janitor-projects.txt

------------------------------------------------------------------------
r162542 | file | 2008-12-09 19:09:32 -0600 (Tue, 09 Dec 2008) | 6 lines

Finish conversion to using ARRAY_LEN and remove it as a janitor project.
(closes issue ASTERISK-13177)
Reported by: bkruse
Patches:
     14032.patch uploaded by bkruse (license 132)

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

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