diff options
author | Mark Salyzyn <salyzyn@google.com> | 2014-10-14 23:57:32 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-10-14 23:57:33 +0000 |
commit | a8aad1667ff191cbc3972c40e8f9ec960db4ef96 (patch) | |
tree | 337d13af419491b02c6637462d5cb2d240447740 | |
parent | e63fb8bd8086a280cae61612da965cb13e75194f (diff) | |
parent | eae155e1ce9c496c2af71a5e56cb182484f10531 (diff) | |
download | system_core-a8aad1667ff191cbc3972c40e8f9ec960db4ef96.zip system_core-a8aad1667ff191cbc3972c40e8f9ec960db4ef96.tar.gz system_core-a8aad1667ff191cbc3972c40e8f9ec960db4ef96.tar.bz2 |
Merge "logd: insert order for first entry"
-rw-r--r-- | logd/LogBuffer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/logd/LogBuffer.cpp b/logd/LogBuffer.cpp index 8c1c344..1c74ba5 100644 --- a/logd/LogBuffer.cpp +++ b/logd/LogBuffer.cpp @@ -147,7 +147,8 @@ void LogBuffer::log(log_id_t log_id, log_time realtime, // NB: if end is region locked, place element at end of list LogBufferElementCollection::iterator it = mLogElements.end(); LogBufferElementCollection::iterator last = it; - while (--it != mLogElements.begin()) { + while (last != mLogElements.begin()) { + --it; if ((*it)->getRealTime() <= realtime) { // halves the peak performance, use with caution if (dgramQlenStatistics) { |