logd: Adjust to match defacto coding style
(cherry picked from commit c46f77bd2ad01f3a695416c4cf22d6a9738bb7b8)
Change-Id: I80685cdc7116e10c5a5a77abe856fd96804f9117
diff --git a/logd/LogBuffer.cpp b/logd/LogBuffer.cpp
index 64d5cc2..7340a36 100644
--- a/logd/LogBuffer.cpp
+++ b/logd/LogBuffer.cpp
@@ -52,11 +52,12 @@
LogBufferElementCollection::iterator it = mLogElements.end();
LogBufferElementCollection::iterator last = it;
while (--it != mLogElements.begin()) {
- if ((*it)->getRealTime() <= elem->getRealTime()) {
+ if ((*it)->getRealTime() <= realtime) {
break;
}
last = it;
}
+
if (last == mLogElements.end()) {
mLogElements.push_back(elem);
} else {
@@ -83,7 +84,7 @@
}
if (end_always
- || (end_set && (end >= (*last)->getMonotonicTime()))) {
+ || (end_set && (end >= (*last)->getMonotonicTime()))) {
mLogElements.push_back(elem);
} else {
mLogElements.insert(last,elem);