From a4b545222f897af772ee0fd12d13ea25c7334493 Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Wed, 20 Jun 2012 21:33:11 +0000 Subject: [PATCH] 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 --- main/logger.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main/logger.c b/main/logger.c index 93be752c34..6bfafe97df 100644 --- a/main/logger.c +++ b/main/logger.c @@ -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'; }