aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorbbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-11 18:09:35 +0000
committerbbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-11 18:09:35 +0000
commit8e222897e657656b5b9af006b50e51812dbed1bb (patch)
treed6654284a45ddbc17f083bedcf5d1055fd08f634 /utils
parent802d09a41e12f28f64a4f6be443ecf0db251b28d (diff)
Janitor patch to change uses of sizeof to ARRAY_LEN
(closes issue #13054) Reported by: pabelanger Patches: ARRAY_LEN.patch2 uploaded by pabelanger (license 224) Tested by: seanbright git-svn-id: http://svn.digium.com/svn/asterisk/trunk@130129 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'utils')
-rw-r--r--utils/astman.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/astman.c b/utils/astman.c
index f674105a5..6c8d74291 100644
--- a/utils/astman.c
+++ b/utils/astman.c
@@ -258,14 +258,14 @@ static int process_message(struct ast_mansession *s, struct message *m)
fprintf(stderr, "Missing event in request");
return 0;
}
- for (x=0;x<sizeof(events) / sizeof(events[0]);x++) {
+ for (x = 0; x < ARRAY_LEN(events); x++) {
if (!strcasecmp(event, events[x].event)) {
if (events[x].func(s, m))
return -1;
break;
}
}
- if (x >= sizeof(events) / sizeof(events[0]))
+ if (x >= ARRAY_LEN(events))
fprintf(stderr, "Ignoring unknown event '%s'", event);
#if 0
for (x=0;x<m->hdrcount;x++) {