Skip to content
Snippets Groups Projects
Commit a4b54522 authored by Richard Mudgett's avatar Richard Mudgett
Browse files

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
parent c11c6b6c
Branches
Tags
No related merge requests found
...@@ -1027,11 +1027,12 @@ static void logger_print_normal(struct logmsg *logmsg) ...@@ -1027,11 +1027,12 @@ static void logger_print_normal(struct logmsg *logmsg)
if (!AST_RWLIST_EMPTY(&logchannels)) { if (!AST_RWLIST_EMPTY(&logchannels)) {
AST_RWLIST_TRAVERSE(&logchannels, chan, list) { 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) { if (logmsg->callid) {
snprintf(call_identifier_str, sizeof(call_identifier_str), "[C-%08x]", logmsg->callid->call_identifier); snprintf(call_identifier_str, sizeof(call_identifier_str), "[C-%08x]", logmsg->callid->call_identifier);
} else {
call_identifier_str[0] = '\0';
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment