mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
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: https://origsvn.digium.com/svn/asterisk/trunk@130129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -466,7 +466,7 @@ static int reload(void)
|
||||
|
||||
static int unload_module(void)
|
||||
{
|
||||
ast_cli_unregister_multiple(cli, sizeof(cli) / sizeof(cli[0]));
|
||||
ast_cli_unregister_multiple(cli, ARRAY_LEN(cli));
|
||||
unregister_translators();
|
||||
|
||||
return 0;
|
||||
@@ -477,7 +477,7 @@ static int load_module(void)
|
||||
if (parse_config(0))
|
||||
return AST_MODULE_LOAD_DECLINE;
|
||||
find_transcoders();
|
||||
ast_cli_register_multiple(cli, sizeof(cli) / sizeof(cli[0]));
|
||||
ast_cli_register_multiple(cli, ARRAY_LEN(cli));
|
||||
return AST_MODULE_LOAD_SUCCESS;
|
||||
}
|
||||
|
||||
|
@@ -166,7 +166,7 @@ static struct ast_frame *lintog722_sample (void)
|
||||
.frametype = AST_FRAME_VOICE,
|
||||
.subclass = AST_FORMAT_SLINEAR,
|
||||
.datalen = sizeof(slin_g722_ex),
|
||||
.samples = sizeof(slin_g722_ex) / sizeof(slin_g722_ex[0]),
|
||||
.samples = ARRAY_LEN(slin_g722_ex),
|
||||
.src = __PRETTY_FUNCTION__,
|
||||
.data.ptr = slin_g722_ex,
|
||||
};
|
||||
@@ -180,7 +180,7 @@ static struct ast_frame *lin16tog722_sample (void)
|
||||
.frametype = AST_FRAME_VOICE,
|
||||
.subclass = AST_FORMAT_SLINEAR16,
|
||||
.datalen = sizeof(slin_g722_ex),
|
||||
.samples = sizeof(slin_g722_ex) / sizeof(slin_g722_ex[0]),
|
||||
.samples = ARRAY_LEN(slin_g722_ex),
|
||||
.src = __PRETTY_FUNCTION__,
|
||||
.data.ptr = slin_g722_ex,
|
||||
};
|
||||
|
@@ -166,7 +166,7 @@ static struct ast_frame *slin16_to_slin8_sample(void)
|
||||
.frametype = AST_FRAME_VOICE,
|
||||
.subclass = AST_FORMAT_SLINEAR16,
|
||||
.datalen = sizeof(slin16_slin8_ex),
|
||||
.samples = sizeof(slin16_slin8_ex) / sizeof(slin16_slin8_ex[0]),
|
||||
.samples = ARRAY_LEN(slin16_slin8_ex),
|
||||
.src = __PRETTY_FUNCTION__,
|
||||
.data.ptr = slin16_slin8_ex,
|
||||
};
|
||||
@@ -180,7 +180,7 @@ static struct ast_frame *slin8_to_slin16_sample(void)
|
||||
.frametype = AST_FRAME_VOICE,
|
||||
.subclass = AST_FORMAT_SLINEAR,
|
||||
.datalen = sizeof(slin8_slin16_ex),
|
||||
.samples = sizeof(slin8_slin16_ex) / sizeof(slin8_slin16_ex[0]),
|
||||
.samples = ARRAY_LEN(slin8_slin16_ex),
|
||||
.src = __PRETTY_FUNCTION__,
|
||||
.data.ptr = slin8_slin16_ex,
|
||||
};
|
||||
|
Reference in New Issue
Block a user