diff options
author | Brett Bryant <bbryant@digium.com> | 2008-07-08 16:40:28 +0000 |
---|---|---|
committer | Brett Bryant <bbryant@digium.com> | 2008-07-08 16:40:28 +0000 |
commit | d1854057559b8893eee71c7b52356d80a24eb72b (patch) | |
tree | df03af827ea95734e2906e4737660d983e3e0b01 /main/callerid.c | |
parent | 2ed6cea5515860b2b062a70c18b3118266716abd (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: https://origsvn.digium.com/svn/asterisk/trunk@129045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/callerid.c')
-rw-r--r-- | main/callerid.c | 6 |
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; } |