Merge "logd: strip out empty trailing iovec" am: 6b11faeb42 am: d749a054ff

am: 657ae57bf3

Change-Id: I522284e11471e9eb4db091275d5461860e8c2e4b
This commit is contained in:
Mark Salyzyn 2017-03-28 15:18:43 +00:00 committed by android-build-merger
commit 046855b551
1 changed files with 3 additions and 1 deletions

View File

@ -235,7 +235,9 @@ log_time LogBufferElement::flushTo(SocketClient* reader, LogBuffer* parent,
}
iovec[1].iov_len = entry.len;
log_time retval = reader->sendDatav(iovec, 2) ? FLUSH_ERROR : mRealTime;
log_time retval = reader->sendDatav(iovec, 1 + (entry.len != 0))
? FLUSH_ERROR
: mRealTime;
if (buffer) free(buffer);