aboutsummaryrefslogtreecommitdiffstats
path: root/main/callerid.c
diff options
context:
space:
mode:
authorbbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-08 16:40:28 +0000
committerbbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-08 16:40:28 +0000
commit0110f8c87a0481038e3673640c387417fb339b4c (patch)
treedf03af827ea95734e2906e4737660d983e3e0b01 /main/callerid.c
parentcdea52a3def39e3b06cb2ef6f0ca88a4c5f710a8 (diff)
Janitor project to convert sizeof to ARRAY_LEN macro.
(closes issue #13002) Reported by: caio1982 Patches: janitor_arraylen5.diff uploaded by caio1982 (license 22) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@129045 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/callerid.c')
-rw-r--r--main/callerid.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main/callerid.c b/main/callerid.c
index 1e9bcad42..c8c3afcb6 100644
--- a/main/callerid.c
+++ b/main/callerid.c
@@ -1099,7 +1099,7 @@ int ast_parse_caller_presentation(const char *data)
{
int i;
- for (i = 0; i < ((sizeof(pres_types) / sizeof(pres_types[0]))); i++) {
+ for (i = 0; i < ARRAY_LEN(pres_types); i++) {
if (!strcasecmp(pres_types[i].name, data))
return pres_types[i].val;
}
@@ -1115,7 +1115,7 @@ const char *ast_describe_caller_presentation(int data)
{
int i;
- for (i = 0; i < ((sizeof(pres_types) / sizeof(pres_types[0]))); i++) {
+ for (i = 0; i < ARRAY_LEN(pres_types); i++) {
if (pres_types[i].val == data)
return pres_types[i].description;
}
@@ -1131,7 +1131,7 @@ const char *ast_named_caller_presentation(int data)
{
int i;
- for (i = 0; i < ((sizeof(pres_types) / sizeof(pres_types[0]))); i++) {
+ for (i = 0; i < ARRAY_LEN(pres_types); i++) {
if (pres_types[i].val == data)
return pres_types[i].name;
}