[svn-commits] russell: trunk r100533 - /trunk/main/channel.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Sun Jan 27 22:43:14 CST 2008
Author: russell
Date: Sun Jan 27 22:43:14 2008
New Revision: 100533
URL: http://svn.digium.com/view/asterisk?view=rev&rev=100533
Log:
Make a couple more uses of ARRAY_LEN, and convert some spaces to tabs
Modified:
trunk/main/channel.c
Modified: trunk/main/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/main/channel.c?view=diff&rev=100533&r1=100532&r2=100533
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Sun Jan 27 22:43:14 2008
@@ -481,7 +481,7 @@
{
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 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;
@@ -4806,44 +4806,45 @@
int ast_say_number(struct ast_channel *chan, int num,
const char *ints, const char *language, const char *options)
{
- return ast_say_number_full(chan, num, ints, language, options, -1, -1);
+ return ast_say_number_full(chan, num, ints, language, options, -1, -1);
}
int ast_say_enumeration(struct ast_channel *chan, int num,
const char *ints, const char *language, const char *options)
{
- return ast_say_enumeration_full(chan, num, ints, language, options, -1, -1);
+ return ast_say_enumeration_full(chan, num, ints, language, options, -1, -1);
}
int ast_say_digits(struct ast_channel *chan, int num,
const char *ints, const char *lang)
{
- return ast_say_digits_full(chan, num, ints, lang, -1, -1);
+ return ast_say_digits_full(chan, num, ints, lang, -1, -1);
}
int ast_say_digit_str(struct ast_channel *chan, const char *str,
const char *ints, const char *lang)
{
- return ast_say_digit_str_full(chan, str, ints, lang, -1, -1);
+ return ast_say_digit_str_full(chan, str, ints, lang, -1, -1);
}
int ast_say_character_str(struct ast_channel *chan, const char *str,
const char *ints, const char *lang)
{
- return ast_say_character_str_full(chan, str, ints, lang, -1, -1);
+ return ast_say_character_str_full(chan, str, ints, lang, -1, -1);
}
int ast_say_phonetic_str(struct ast_channel *chan, const char *str,
const char *ints, const char *lang)
{
- return ast_say_phonetic_str_full(chan, str, ints, lang, -1, -1);
+ return ast_say_phonetic_str_full(chan, str, ints, lang, -1, -1);
}
int ast_say_digits_full(struct ast_channel *chan, int num,
const char *ints, const char *lang, int audiofd, int ctrlfd)
{
- char buf[256];
-
- snprintf(buf, sizeof(buf), "%d", num);
- return ast_say_digit_str_full(chan, buf, ints, lang, audiofd, ctrlfd);
-}
+ char buf[256];
+
+ snprintf(buf, sizeof(buf), "%d", num);
+
+ return ast_say_digit_str_full(chan, buf, ints, lang, audiofd, ctrlfd);
+}
More information about the svn-commits
mailing list