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.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett 2012-06-20 21:33:11 +00:00
parent c11c6b6cb0
commit a4b545222f
1 changed files with 3 additions and 2 deletions

View File

@ -1027,11 +1027,12 @@ static void logger_print_normal(struct logmsg *logmsg)
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';
}