diff options
Diffstat (limited to 'pbx')
-rw-r--r-- | pbx/pbx_ael.c | 4 | ||||
-rw-r--r-- | pbx/pbx_config.c | 4 | ||||
-rw-r--r-- | pbx/pbx_dundi.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c index 65569f5b9..e60fe251a 100644 --- a/pbx/pbx_ael.c +++ b/pbx/pbx_ael.c @@ -214,13 +214,13 @@ static struct ast_cli_entry cli_ael[] = { static int unload_module(void) { ast_context_destroy(NULL, registrar); - ast_cli_unregister_multiple(cli_ael, sizeof(cli_ael) / sizeof(struct ast_cli_entry)); + ast_cli_unregister_multiple(cli_ael, ARRAY_LEN(cli_ael)); return 0; } static int load_module(void) { - ast_cli_register_multiple(cli_ael, sizeof(cli_ael) / sizeof(struct ast_cli_entry)); + ast_cli_register_multiple(cli_ael, ARRAY_LEN(cli_ael)); return (pbx_load_module()); } diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c index 4422557be..dac6389c3 100644 --- a/pbx/pbx_config.c +++ b/pbx/pbx_config.c @@ -1398,7 +1398,7 @@ static int unload_module(void) if (overrideswitch_config) { ast_free(overrideswitch_config); } - ast_cli_unregister_multiple(cli_pbx_config, sizeof(cli_pbx_config) / sizeof(struct ast_cli_entry)); + ast_cli_unregister_multiple(cli_pbx_config, ARRAY_LEN(cli_pbx_config)); ast_context_destroy(NULL, registrar); return 0; } @@ -1738,7 +1738,7 @@ static int load_module(void) if (static_config && !write_protect_config) ast_cli_register(&cli_dialplan_save); - ast_cli_register_multiple(cli_pbx_config, sizeof(cli_pbx_config) / sizeof(struct ast_cli_entry)); + ast_cli_register_multiple(cli_pbx_config, ARRAY_LEN(cli_pbx_config)); return AST_MODULE_LOAD_SUCCESS; } diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c index 08177723f..294dd816b 100644 --- a/pbx/pbx_dundi.c +++ b/pbx/pbx_dundi.c @@ -4701,7 +4701,7 @@ static int unload_module(void) pthread_join(previous_precachethreadid, NULL); } - ast_cli_unregister_multiple(cli_dundi, sizeof(cli_dundi) / sizeof(struct ast_cli_entry)); + ast_cli_unregister_multiple(cli_dundi, ARRAY_LEN(cli_dundi)); ast_unregister_switch(&dundi_switch); ast_custom_function_unregister(&dundi_function); ast_custom_function_unregister(&dundi_query_function); @@ -4769,7 +4769,7 @@ static int load_module(void) return AST_MODULE_LOAD_FAILURE; } - ast_cli_register_multiple(cli_dundi, sizeof(cli_dundi) / sizeof(*cli_dundi)); + ast_cli_register_multiple(cli_dundi, ARRAY_LEN(cli_dundi)); if (ast_register_switch(&dundi_switch)) ast_log(LOG_ERROR, "Unable to register DUNDi switch\n"); ast_custom_function_register(&dundi_function); |