Fixes a Valgrind warning triggering when the number of pending messages hit the limit.

Review URL: http://webrtc-codereview.appspot.com/200002

git-svn-id: http://webrtc.googlecode.com/svn/trunk@705 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrike@webrtc.org 2011-10-06 17:55:56 +00:00
parent 2915f6fc44
commit 1a2933c71a

View File

@ -607,9 +607,12 @@ void TraceImpl::AddMessageToList(
if(_nextFreeIdx[_activeQueue] == WEBRTC_TRACE_MAX_QUEUE-1)
{
// Loggin more messages than can be worked off. Log a warning.
// Logging more messages than can be worked off. Log a warning.
const char warning_msg[] = "WARNING MISSING TRACE MESSAGES\n";
_level[_activeQueue][_nextFreeIdx[_activeQueue]] = kTraceWarning;
_length[_activeQueue][_nextFreeIdx[_activeQueue]] = strlen(warning_msg);
memcpy(_messageQueue[_activeQueue][_nextFreeIdx[_activeQueue]],
"WARNING MISSING TRACE MESSAGES\n", 32);
warning_msg, _length[_activeQueue][idx]);
_nextFreeIdx[_activeQueue]++;
}
}