From 0adcc3e3e8bd6d7c57994f828ee22c104b4eb043 Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Fri, 15 Jul 2016 07:40:33 -0700 Subject: [PATCH] logd: trailing spaces in log statistics Bug: 30118730 Change-Id: I8cccbc1da2cf8168ec9cf12f07df4cafef076558 --- logd/LogStatistics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logd/LogStatistics.cpp b/logd/LogStatistics.cpp index 02a4a7534..a2d2aa525 100644 --- a/logd/LogStatistics.cpp +++ b/logd/LogStatistics.cpp @@ -284,7 +284,7 @@ std::string UidEntry::format(const LogStatistics &stat, log_id_t id) const { if ((spaces <= 0) && pruned.length()) { spaces = 1; } - if (spaces > 0) { + if ((spaces > 0) && (pruned.length() != 0)) { change += android::base::StringPrintf("%*s", (int)spaces, ""); } pruned = change + pruned;