diff options
author | bbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-08 16:41:31 +0000 |
---|---|---|
committer | bbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-08 16:41:31 +0000 |
commit | 3b5c2f2ec9a1f1b932a72c54ec99f2ade7b874e5 (patch) | |
tree | 2e4756c8d1b95bdec564a84466c61973aa5e336e /apps/app_adsiprog.c | |
parent | b2d0a411d289307a4a22e2647d0ad5540542de01 (diff) |
Merged revisions 129045 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r129045 | bbryant | 2008-07-08 11:40:28 -0500 (Tue, 08 Jul 2008) | 7 lines
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: http://svn.digium.com/svn/asterisk/branches/1.6.0@129046 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_adsiprog.c')
-rw-r--r-- | apps/app_adsiprog.c | 8 |
1 files changed, 4 insertions, 4 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, |