diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_adsiprog.c | 8 | ||||
-rw-r--r-- | apps/app_meetme.c | 2 | ||||
-rw-r--r-- | apps/app_parkandannounce.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/apps/app_adsiprog.c b/apps/app_adsiprog.c index 264bab0e7..63be6bf06 100644 --- a/apps/app_adsiprog.c +++ b/apps/app_adsiprog.c @@ -515,7 +515,7 @@ static int geteventbyname(char *name) { int x; - for (x = 0; x < sizeof(events) / sizeof(events[0]); x++) { + for (x = 0; x < ARRAY_LEN(events); x++) { if (!strcasecmp(events[x].name, name)) return events[x].id; } @@ -527,7 +527,7 @@ static int getjustifybyname(char *name) { int x; - for (x = 0; x <sizeof(justify) / sizeof(justify[0]); x++) { + for (x = 0; x < ARRAY_LEN(justify); x++) { if (!strcasecmp(justify[x].name, name)) return justify[x].id; } @@ -935,7 +935,7 @@ static int process_returncode(struct adsi_soft_key *key, char *code, char *args, int x, res; char *unused; - for (x = 0; x < sizeof(kcmds) / sizeof(kcmds[0]); x++) { + for (x = 0; x < ARRAY_LEN(kcmds); x++) { if ((kcmds[x].id > -1) && !strcasecmp(kcmds[x].name, code)) { if (kcmds[x].add_args) { res = kcmds[x].add_args(key->retstr + key->retstrlen, @@ -964,7 +964,7 @@ static int process_opcode(struct adsi_subscript *sub, char *code, char *args, st int x, res, max = sub->id ? MAX_SUB_LEN : MAX_MAIN_LEN; char *unused; - for (x = 0; x < sizeof(opcmds) / sizeof(opcmds[0]); x++) { + for (x = 0; x < ARRAY_LEN(opcmds); x++) { if ((opcmds[x].id > -1) && !strcasecmp(opcmds[x].name, code)) { if (opcmds[x].add_args) { res = opcmds[x].add_args(sub->data + sub->datalen, diff --git a/apps/app_meetme.c b/apps/app_meetme.c index 6ab05e2fd..cb5301f2f 100644 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -3068,7 +3068,7 @@ static int conf_exec(struct ast_channel *chan, void *data) /* Select first conference number not in use */ if (ast_strlen_zero(confno) && dynamic) { AST_LIST_LOCK(&confs); - for (i = 0; i < sizeof(conf_map) / sizeof(conf_map[0]); i++) { + for (i = 0; i < ARRAY_LEN(conf_map); i++) { if (!conf_map[i]) { snprintf(confno, sizeof(confno), "%d", i); conf_map[i] = 1; diff --git a/apps/app_parkandannounce.c b/apps/app_parkandannounce.c index 07008248b..8f47248d0 100644 --- a/apps/app_parkandannounce.c +++ b/apps/app_parkandannounce.c @@ -146,7 +146,7 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data) ast_verb(4, "Announce Template:%s\n", args.template); - for (looptemp = 0; looptemp < sizeof(tmp) / sizeof(tmp[0]); looptemp++) { + for (looptemp = 0; looptemp < ARRAY_LEN(tmp); looptemp++) { if ((tmp[looptemp] = strsep(&args.template, ":")) != NULL) continue; else |