summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-10-14 23:57:32 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-10-14 23:57:33 +0000
commita8aad1667ff191cbc3972c40e8f9ec960db4ef96 (patch)
tree337d13af419491b02c6637462d5cb2d240447740
parente63fb8bd8086a280cae61612da965cb13e75194f (diff)
parenteae155e1ce9c496c2af71a5e56cb182484f10531 (diff)
downloadsystem_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.cpp3
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) {