mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 08:13:22 +00:00
Make a couple more uses of ARRAY_LEN, and convert some spaces to tabs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -481,7 +481,7 @@ const char *ast_cause2str(int cause)
|
||||
{
|
||||
int x;
|
||||
|
||||
for (x=0; x < sizeof(causes) / sizeof(causes[0]); x++) {
|
||||
for (x = 0; x < ARRAY_LEN(causes); x++) {
|
||||
if (causes[x].cause == cause)
|
||||
return causes[x].desc;
|
||||
}
|
||||
@@ -494,8 +494,8 @@ int ast_str2cause(const char *name)
|
||||
{
|
||||
int x;
|
||||
|
||||
for (x = 0; x < sizeof(causes) / sizeof(causes[0]); x++)
|
||||
if (strncasecmp(causes[x].name, name, strlen(causes[x].name)) == 0)
|
||||
for (x = 0; x < ARRAY_LEN(causes); x++)
|
||||
if (!strncasecmp(causes[x].name, name, strlen(causes[x].name)))
|
||||
return causes[x].cause;
|
||||
|
||||
return -1;
|
||||
@@ -4845,5 +4845,6 @@ int ast_say_digits_full(struct ast_channel *chan, int num,
|
||||
char buf[256];
|
||||
|
||||
snprintf(buf, sizeof(buf), "%d", num);
|
||||
|
||||
return ast_say_digit_str_full(chan, buf, ints, lang, audiofd, ctrlfd);
|
||||
}
|
||||
|
Reference in New Issue
Block a user