Skip to content
Snippets Groups Projects
Commit 51377db4 authored by Russell Bryant's avatar Russell Bryant
Browse files

- Use the ARRAY_LEN macro in a couple places

- return errors from load_module / unload_module


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 0df5e50e
No related branches found
No related tags found
No related merge requests found
......@@ -182,15 +182,15 @@ static struct ast_cli_entry cli_cliorig[] = {
/*! \brief Unload orginate module */
static int unload_module(void)
{
ast_cli_unregister_multiple(cli_cliorig, sizeof(cli_cliorig) / sizeof(struct ast_cli_entry));
return 0;
return ast_cli_unregister_multiple(cli_cliorig, ARRAY_LEN(cli_cliorig));
}
/*! \brief Load orginate module */
static int load_module(void)
{
ast_cli_register_multiple(cli_cliorig, sizeof(cli_cliorig) / sizeof(struct ast_cli_entry));
return AST_MODULE_LOAD_SUCCESS;
int res;
res = ast_cli_register_multiple(cli_cliorig, ARRAY_LEN(cli_cliorig));
return res ? AST_MODULE_LOAD_DECLINE : AST_MODULE_LOAD_SUCCESS;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Call origination from the CLI");
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment