diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_chanspy.c | 4 | ||||
-rw-r--r-- | apps/app_milliwatt.c | 2 | ||||
-rw-r--r-- | apps/app_minivm.c | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index 7a89efd80..b570169cb 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -754,12 +754,12 @@ static int common_exec(struct ast_channel *chan, struct ast_flags *flags, if (mygroup) { dup_mygroup = ast_strdupa(mygroup); num_mygroups = ast_app_separate_args(dup_mygroup, ':', mygroups, - sizeof(mygroups) / sizeof(mygroups[0])); + ARRAY_LEN(mygroups)); if ((group = pbx_builtin_getvar_helper(peer, "SPYGROUP"))) { dup_group = ast_strdupa(group); num_groups = ast_app_separate_args(dup_group, ':', groups, - sizeof(groups) / sizeof(groups[0])); + ARRAY_LEN(groups)); } for (y = 0; y < num_mygroups; y++) { diff --git a/apps/app_milliwatt.c b/apps/app_milliwatt.c index 0fcd72151..89063096c 100644 --- a/apps/app_milliwatt.c +++ b/apps/app_milliwatt.c @@ -64,7 +64,7 @@ static void milliwatt_release(struct ast_channel *chan, void *data) static int milliwatt_generate(struct ast_channel *chan, void *data, int len, int samples) { unsigned char buf[AST_FRIENDLY_OFFSET + 640]; - const int maxsamples = sizeof (buf) / sizeof (buf[0]); + const int maxsamples = ARRAY_LEN(buf); int i, *indexp = (int *) data; struct ast_frame wf = { .frametype = AST_FRAME_VOICE, diff --git a/apps/app_minivm.c b/apps/app_minivm.c index 8b507ddd7..cd6e84c02 100644 --- a/apps/app_minivm.c +++ b/apps/app_minivm.c @@ -1641,7 +1641,7 @@ static int minivm_notify_exec(struct ast_channel *chan, void *data) ast_log(LOG_ERROR, "Out of memory\n"); return -1; } - argc = ast_app_separate_args(tmpptr, ',', argv, sizeof(argv) / sizeof(argv[0])); + argc = ast_app_separate_args(tmpptr, ',', argv, ARRAY_LEN(argv)); if (argc == 2 && !ast_strlen_zero(argv[1])) template = argv[1]; @@ -1721,7 +1721,7 @@ static int minivm_record_exec(struct ast_channel *chan, void *data) ast_log(LOG_ERROR, "Out of memory\n"); return -1; } - argc = ast_app_separate_args(tmp, ',', argv, sizeof(argv) / sizeof(argv[0])); + argc = ast_app_separate_args(tmp, ',', argv, ARRAY_LEN(argv)); if (argc == 2) { if (ast_app_parse_options(minivm_app_options, &flags, opts, argv[1])) { return -1; @@ -1783,7 +1783,7 @@ static int minivm_greet_exec(struct ast_channel *chan, void *data) ast_log(LOG_ERROR, "Out of memory\n"); return -1; } - argc = ast_app_separate_args(tmpptr, ',', argv, sizeof(argv) / sizeof(argv[0])); + argc = ast_app_separate_args(tmpptr, ',', argv, ARRAY_LEN(argv)); if (argc == 2) { if (ast_app_parse_options(minivm_app_options, &flags, opts, argv[1])) @@ -2005,7 +2005,7 @@ static int minivm_accmess_exec(struct ast_channel *chan, void *data) ast_log(LOG_ERROR, "Out of memory\n"); error = TRUE; } else - argc = ast_app_separate_args(tmpptr, ',', argv, sizeof(argv) / sizeof(argv[0])); + argc = ast_app_separate_args(tmpptr, ',', argv, ARRAY_LEN(argv)); } if (argc <=1) { |