[svn-commits] rmudgett: trunk r369167 - /trunk/main/logger.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Jun 20 16:33:15 CDT 2012
Author: rmudgett
Date: Wed Jun 20 16:33:11 2012
New Revision: 369167
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=369167
Log:
Don't waste time initializing the whole call_identifer_str[].
The array is either setup with a callid string or only the first element
needs to be initialized.
Modified:
trunk/main/logger.c
Modified: trunk/main/logger.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/logger.c?view=diff&rev=369167&r1=369166&r2=369167
==============================================================================
--- trunk/main/logger.c (original)
+++ trunk/main/logger.c Wed Jun 20 16:33:11 2012
@@ -1027,11 +1027,12 @@
if (!AST_RWLIST_EMPTY(&logchannels)) {
AST_RWLIST_TRAVERSE(&logchannels, chan, list) {
- /* XXX May need to grow larger later in order to accomodate call counts higher than 999999. */
- char call_identifier_str[13] = "";
+ char call_identifier_str[13];
if (logmsg->callid) {
snprintf(call_identifier_str, sizeof(call_identifier_str), "[C-%08x]", logmsg->callid->call_identifier);
+ } else {
+ call_identifier_str[0] = '\0';
}
More information about the svn-commits
mailing list