summaryrefslogtreecommitdiffstats
path: root/media/libnbaio/NBLog.cpp
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2014-11-06 17:49:48 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2014-11-06 17:49:48 -0800
commite1a2df553a6d151807a5da738a3cd853bef908d9 (patch)
tree9015c1c9ad9ec69f1962657f70fe3df386fbb05a /media/libnbaio/NBLog.cpp
parentbcf093bfef277a8ec0119da9e84e5abac58ad0b1 (diff)
parent841daebc75fbf5e7fb4dd71cab559b8f4d7150ae (diff)
downloadframeworks_av-e1a2df553a6d151807a5da738a3cd853bef908d9.zip
frameworks_av-e1a2df553a6d151807a5da738a3cd853bef908d9.tar.gz
frameworks_av-e1a2df553a6d151807a5da738a3cd853bef908d9.tar.bz2
Resolve conflict
Diffstat (limited to 'media/libnbaio/NBLog.cpp')
-rw-r--r--media/libnbaio/NBLog.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/media/libnbaio/NBLog.cpp b/media/libnbaio/NBLog.cpp
index 4f5762f..4d14904 100644
--- a/media/libnbaio/NBLog.cpp
+++ b/media/libnbaio/NBLog.cpp
@@ -341,8 +341,8 @@ void NBLog::Reader::dump(int fd, size_t indent)
mFd = fd;
mIndent = indent;
String8 timestamp, body;
- if (i > 0) {
- lost += i;
+ lost += i;
+ if (lost > 0) {
body.appendFormat("warning: lost %zu bytes worth of events", lost);
// TODO timestamp empty here, only other choice to wait for the first timestamp event in the
// log to push it out. Consider keeping the timestamp/body between calls to readAt().
@@ -447,7 +447,7 @@ void NBLog::Reader::dumpLine(const String8& timestamp, String8& body)
bool NBLog::Reader::isIMemory(const sp<IMemory>& iMemory) const
{
- return iMemory.get() == mIMemory.get();
+ return iMemory != 0 && mIMemory != 0 && iMemory->pointer() == mIMemory->pointer();
}
} // namespace android