Janitor, use ARRAY_LEN() when possible.

(closes issue #13990)
Reported by: eliel
Patches:
      array_len.diff uploaded by eliel (license 64)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Eliel C. Sardanons
2008-12-05 10:31:25 +00:00
parent da8069394b
commit 1e8e12efcf
42 changed files with 69 additions and 71 deletions

View File

@@ -9052,11 +9052,11 @@ int load_pbx(void)
}
ast_verb(1, "Registering builtin applications:\n");
ast_cli_register_multiple(pbx_cli, sizeof(pbx_cli) / sizeof(struct ast_cli_entry));
ast_cli_register_multiple(pbx_cli, ARRAY_LEN(pbx_cli));
__ast_custom_function_register(&exception_function, NULL);
/* Register builtin applications */
for (x = 0; x < sizeof(builtins) / sizeof(struct pbx_builtin); x++) {
for (x = 0; x < ARRAY_LEN(builtins); x++) {
ast_verb(1, "[%s]\n", builtins[x].name);
if (ast_register_application2(builtins[x].name, builtins[x].execute, NULL, NULL, NULL)) {
ast_log(LOG_ERROR, "Unable to register builtin application '%s'\n", builtins[x].name);