[asterisk-commits] russell: trunk r100532 - /trunk/main/channel.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Jan 27 22:30:44 CST 2008
Author: russell
Date: Sun Jan 27 22:30:44 2008
New Revision: 100532
URL: http://svn.digium.com/view/asterisk?view=rev&rev=100532
Log:
- Simplify a line with ARRAY_LEN()
- Make a few little formatting changes
Modified:
trunk/main/channel.c
Modified: trunk/main/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/main/channel.c?view=diff&rev=100532&r1=100531&r2=100532
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Sun Jan 27 22:30:44 2008
@@ -4561,14 +4561,14 @@
void ast_channels_init(void)
{
- ast_cli_register_multiple(cli_channel, sizeof(cli_channel) / sizeof(struct ast_cli_entry));
+ ast_cli_register_multiple(cli_channel, ARRAY_LEN(cli_channel));
}
/*! \brief Print call group and pickup group ---*/
char *ast_print_group(char *buf, int buflen, ast_group_t group)
{
unsigned int i;
- int first=1;
+ int first = 1;
char num[3];
buf[0] = '\0';
@@ -4581,7 +4581,7 @@
if (!first) {
strncat(buf, ", ", buflen);
} else {
- first=0;
+ first = 0;
}
snprintf(num, sizeof(num), "%u", i);
strncat(buf, num, buflen);
@@ -4619,9 +4619,12 @@
.samples = samples,
.datalen = sizeof(buf),
};
+
memset(buf, 0, sizeof(buf));
+
if (ast_write(chan, &frame))
return -1;
+
return 0;
}
More information about the asterisk-commits
mailing list