aboutsummaryrefslogtreecommitdiffstats
path: root/main/manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/manager.c')
-rw-r--r--main/manager.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main/manager.c b/main/manager.c
index d655c5907..3b580005c 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -344,7 +344,7 @@ static char *authority_to_str(int authority, struct ast_str **res)
char *sep = "";
(*res)->used = 0;
- for (i = 0; i < (sizeof(perms) / sizeof(perms[0])) - 1; i++) {
+ for (i = 0; i < ARRAY_LEN(perms) - 1; i++) {
if (authority & perms[i].num) {
ast_str_append(res, 0, "%s%s", sep, perms[i].label);
sep = ",";
@@ -386,7 +386,7 @@ static int get_perm(const char *instr)
if (!instr)
return 0;
- for (x = 0; x < (sizeof(perms) / sizeof(perms[0])); x++) {
+ for (x = 0; x < ARRAY_LEN(perms); x++) {
if (ast_instring(instr, perms[x].label, ','))
ret |= perms[x].num;
}
@@ -414,7 +414,7 @@ static int strings_to_mask(const char *string)
return 0;
if (ast_true(string)) { /* all permissions */
int x, ret = 0;
- for (x = 0; x<sizeof(perms) / sizeof(perms[0]); x++)
+ for (x = 0; x < ARRAY_LEN(perms); x++)
ret |= perms[x].num;
return ret;
}