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:
Russell Bryant
2008-01-28 04:43:14 +00:00
parent e8f7cbf358
commit 87800e1913

View File

@@ -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);
}